summary refs log tree commit diff
path: root/crypto/src/asn1
diff options
context:
space:
mode:
authorDavid Hook <dgh@cryptoworkshop.com>2021-10-08 17:02:10 +1100
committerDavid Hook <dgh@cryptoworkshop.com>2021-10-08 17:02:10 +1100
commit875bf434eceb99193d109d94ec16212b8ff0618e (patch)
treeae0a15d169a0a168a4bcb7e0d4c17a9f1e3a71ab /crypto/src/asn1
parentadded explicit sorting of DER encoded SET (diff)
downloadBouncyCastle.NET-ed25519-875bf434eceb99193d109d94ec16212b8ff0618e.tar.xz
completed copy constructor in SignerInformation, fixed mutable issue for SET in ASN1Encodable
Diffstat (limited to 'crypto/src/asn1')
-rw-r--r--crypto/src/asn1/Asn1Encodable.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/crypto/src/asn1/Asn1Encodable.cs b/crypto/src/asn1/Asn1Encodable.cs
index c7fde6e07..6314bf76f 100644
--- a/crypto/src/asn1/Asn1Encodable.cs
+++ b/crypto/src/asn1/Asn1Encodable.cs
@@ -28,10 +28,12 @@ namespace Org.BouncyCastle.Asn1
 
 				if (this is Asn1Set)
 				{
-					(this as Asn1Set).Sort();
+					dOut.WriteObject(new DerSet((this as Asn1Set).elements));
+				}
+				else
+				{
+					dOut.WriteObject(this);
 				}
-
-				dOut.WriteObject(this);
 
 				return bOut.ToArray();
 			}