summary refs log tree commit diff
path: root/crypto/test
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2021-10-14 16:29:46 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2021-10-14 16:29:46 +0700
commitc1c9c9ad03d363522a0e2ed9b3fead4016f6a01b (patch)
tree4fb0454345cd9f565935db1f57eb74ad19f7ce4a /crypto/test
parentAdd Asn1Encodable.EncodeTo methods (diff)
downloadBouncyCastle.NET-ed25519-c1c9c9ad03d363522a0e2ed9b3fead4016f6a01b.tar.xz
Some Obsolete cleanup
Diffstat (limited to 'crypto/test')
-rw-r--r--crypto/test/src/pkcs/test/PKCS12StoreTest.cs11
1 files changed, 3 insertions, 8 deletions
diff --git a/crypto/test/src/pkcs/test/PKCS12StoreTest.cs b/crypto/test/src/pkcs/test/PKCS12StoreTest.cs
index fbceffe58..1b49a5d02 100644
--- a/crypto/test/src/pkcs/test/PKCS12StoreTest.cs
+++ b/crypto/test/src/pkcs/test/PKCS12StoreTest.cs
@@ -1343,23 +1343,18 @@ namespace Org.BouncyCastle.Pkcs.Tests
 			//
 			// check algorithm types.
 			//
-			Asn1InputStream aIn = new Asn1InputStream(bOut.ToArray());
-
-			Pfx pfx = new Pfx((Asn1Sequence)aIn.ReadObject());
+			Pfx pfx = Pfx.GetInstance(bOut.ToArray());
 
 			ContentInfo cInfo = pfx.AuthSafe;
 
 			Asn1OctetString auth = (Asn1OctetString)cInfo.Content;
 
-			aIn = new Asn1InputStream(auth.GetOctets());
-			Asn1Sequence s1 = (Asn1Sequence)aIn.ReadObject();
+            Asn1Sequence s1 = Asn1Sequence.GetInstance(auth.GetOctets());
 
 			ContentInfo c1 = ContentInfo.GetInstance(s1[0]);
 			ContentInfo c2 = ContentInfo.GetInstance(s1[1]);
 
-			aIn = new Asn1InputStream(((Asn1OctetString)c1.Content).GetOctets());
-
-			SafeBag sb = new SafeBag((Asn1Sequence)(((Asn1Sequence)aIn.ReadObject())[0]));
+            SafeBag sb = SafeBag.GetInstance(Asn1Sequence.GetInstance(((Asn1OctetString)c1.Content).GetOctets())[0]);
 
 			EncryptedPrivateKeyInfo encInfo = EncryptedPrivateKeyInfo.GetInstance(sb.BagValue);