diff options
Diffstat (limited to 'crypto/src/asn1/LazyDERSet.cs')
-rw-r--r-- | crypto/src/asn1/LazyDERSet.cs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/crypto/src/asn1/LazyDERSet.cs b/crypto/src/asn1/LazyDERSet.cs index e6c9319dd..eac64cbbe 100644 --- a/crypto/src/asn1/LazyDERSet.cs +++ b/crypto/src/asn1/LazyDERSet.cs @@ -21,16 +21,18 @@ namespace Org.BouncyCastle.Asn1 { if (encoded != null) { - Asn1InputStream e = new LazyAsn1InputStream(encoded); + Asn1EncodableVector v = new Asn1EncodableVector(); + Asn1InputStream e = new LazyAsn1InputStream(encoded); Asn1Object o; while ((o = e.ReadObject()) != null) { - AddObject(o); + v.Add(o); } - encoded = null; - } + this.elements = v.TakeElements(); + this.encoded = null; + } } } |