diff options
-rw-r--r-- | crypto/src/pkcs/Pkcs12Store.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/src/pkcs/Pkcs12Store.cs b/crypto/src/pkcs/Pkcs12Store.cs index 55f20206a..40364eec7 100644 --- a/crypto/src/pkcs/Pkcs12Store.cs +++ b/crypto/src/pkcs/Pkcs12Store.cs @@ -362,8 +362,8 @@ namespace Org.BouncyCastle.Pkcs foreach (Asn1Sequence sq in b.BagAttributes) { - DerObjectIdentifier aOid = (DerObjectIdentifier) sq[0]; - Asn1Set attrSet = (Asn1Set) sq[1]; + DerObjectIdentifier aOid = DerObjectIdentifier.GetInstance(sq[0]); + Asn1Set attrSet = Asn1Set.GetInstance(sq[1]); Asn1Encodable attr = null; if (attrSet.Count > 0) @@ -450,8 +450,8 @@ namespace Org.BouncyCastle.Pkcs { foreach (Asn1Sequence sq in b.BagAttributes) { - DerObjectIdentifier aOid = (DerObjectIdentifier) sq[0]; - Asn1Set attrSet = (Asn1Set) sq[1]; + DerObjectIdentifier aOid = DerObjectIdentifier.GetInstance(sq[0]); + Asn1Set attrSet = Asn1Set.GetInstance(sq[1]); if (attrSet.Count > 0) { |