From 214606ac44e428298e3db861428114828416d0c9 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sun, 16 Aug 2020 21:39:37 -0600 Subject: [PATCH] Address another warning --- src/PCLCrypto/iOS/RsaAsymmetricKeyAlgorithmProvider.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PCLCrypto/iOS/RsaAsymmetricKeyAlgorithmProvider.cs b/src/PCLCrypto/iOS/RsaAsymmetricKeyAlgorithmProvider.cs index 999cda8a..9635badd 100644 --- a/src/PCLCrypto/iOS/RsaAsymmetricKeyAlgorithmProvider.cs +++ b/src/PCLCrypto/iOS/RsaAsymmetricKeyAlgorithmProvider.cs @@ -132,7 +132,7 @@ public ICryptographicKey ImportPublicKey(byte[] keyBlob, CryptographicPublicKeyB // Inject the PKCS#1 public key into the KeyChain. string keyIdentifier = Guid.NewGuid().ToString(); string publicKeyIdentifier = RsaCryptographicKey.GetPublicKeyIdentifierWithTag(keyIdentifier); - var keyQueryDictionary = RsaCryptographicKey.CreateKeyQueryDictionary(publicKeyIdentifier); + using var keyQueryDictionary = RsaCryptographicKey.CreateKeyQueryDictionary(publicKeyIdentifier); keyQueryDictionary[KSec.ValueData] = NSData.FromArray(KeyFormatter.Pkcs1.Write(parameters, includePrivateKey: false)); keyQueryDictionary[KSec.AttrKeyClass] = KSec.AttrKeyClassPublic; keyQueryDictionary[KSec.ReturnRef] = NSNumber.FromBoolean(true);