summary refs log tree commit diff
path: root/crypto/src/asn1/DerSequence.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/DerSequence.cs')
-rw-r--r--crypto/src/asn1/DerSequence.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/crypto/src/asn1/DerSequence.cs b/crypto/src/asn1/DerSequence.cs
index 5b315a909..157d99c93 100644
--- a/crypto/src/asn1/DerSequence.cs
+++ b/crypto/src/asn1/DerSequence.cs
@@ -74,7 +74,7 @@ namespace Org.BouncyCastle.Asn1
             MemoryStream bOut = new MemoryStream();
             Asn1OutputStream dOut = Asn1OutputStream.Create(bOut, Der);
             dOut.WriteElements(elements);
-            dOut.Flush();
+            dOut.FlushInternal();
 
 #if PORTABLE
             byte[] bytes = bOut.ToArray();
@@ -103,5 +103,11 @@ namespace Org.BouncyCastle.Asn1
         {
             return new DerOctetString(BerOctetString.FlattenOctetStrings(GetConstructedOctetStrings()));
         }
+
+        internal override Asn1Set ToAsn1Set()
+        {
+            // NOTE: DLSet is intentional, we don't want sorting
+            return new DLSet(false, elements);
+        }
     }
 }