From 4206023cd1ba392562ecc3d9b3f37f7e1b456d76 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Thu, 8 Jul 2021 17:05:55 +0700 Subject: ASN.1 updates from bc-java --- crypto/src/asn1/LazyDERSequence.cs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'crypto/src/asn1/LazyDERSequence.cs') diff --git a/crypto/src/asn1/LazyDERSequence.cs b/crypto/src/asn1/LazyDERSequence.cs index 8fa7a0792..78e9df151 100644 --- a/crypto/src/asn1/LazyDERSequence.cs +++ b/crypto/src/asn1/LazyDERSequence.cs @@ -21,19 +21,13 @@ namespace Org.BouncyCastle.Asn1 { if (null != encoded) { - Asn1EncodableVector v = new Asn1EncodableVector(); Asn1InputStream e = new LazyAsn1InputStream(encoded); - - Asn1Object o; - while ((o = e.ReadObject()) != null) - { - v.Add(o); - } + Asn1EncodableVector v = e.ReadVector(); this.elements = v.TakeElements(); this.encoded = null; } - } + } } public override Asn1Encodable this[int index] -- cgit 1.4.1