diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2021-10-14 12:37:07 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2021-10-14 12:37:07 +0700 |
commit | 5e745d4952792a463ad2427704b2f3a6d891f36e (patch) | |
tree | 571783e2368684b9c9c13134ee8ca1302f5f4cd0 | |
parent | Improve handling of signatures for duplicated user-id/attributes (diff) | |
download | BouncyCastle.NET-ed25519-5e745d4952792a463ad2427704b2f3a6d891f36e.tar.xz |
ASN.1 opts.
-rw-r--r-- | crypto/src/asn1/Asn1Encodable.cs | 4 | ||||
-rw-r--r-- | crypto/src/asn1/BerOctetString.cs | 2 | ||||
-rw-r--r-- | crypto/src/asn1/BerSequence.cs | 2 | ||||
-rw-r--r-- | crypto/src/asn1/BerSet.cs | 2 | ||||
-rw-r--r-- | crypto/src/asn1/DerSequence.cs | 2 | ||||
-rw-r--r-- | crypto/src/asn1/DerSet.cs | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/crypto/src/asn1/Asn1Encodable.cs b/crypto/src/asn1/Asn1Encodable.cs index f42f0bbcf..f70b3a4cb 100644 --- a/crypto/src/asn1/Asn1Encodable.cs +++ b/crypto/src/asn1/Asn1Encodable.cs @@ -13,9 +13,9 @@ namespace Org.BouncyCastle.Asn1 MemoryStream bOut = new MemoryStream(); Asn1OutputStream aOut = new Asn1OutputStream(bOut); - aOut.WriteObject(this); + ToAsn1Object().Encode(aOut); - return bOut.ToArray(); + return bOut.ToArray(); } public byte[] GetEncoded(string encoding) diff --git a/crypto/src/asn1/BerOctetString.cs b/crypto/src/asn1/BerOctetString.cs index 2b4de4b2f..3085f3569 100644 --- a/crypto/src/asn1/BerOctetString.cs +++ b/crypto/src/asn1/BerOctetString.cs @@ -135,7 +135,7 @@ namespace Org.BouncyCastle.Asn1 // foreach (Asn1OctetString oct in this) { - derOut.WriteObject(oct); + oct.Encode(derOut); } derOut.WriteByte(0x00); diff --git a/crypto/src/asn1/BerSequence.cs b/crypto/src/asn1/BerSequence.cs index 55c93a72e..ccff73c37 100644 --- a/crypto/src/asn1/BerSequence.cs +++ b/crypto/src/asn1/BerSequence.cs @@ -48,7 +48,7 @@ namespace Org.BouncyCastle.Asn1 foreach (Asn1Encodable o in this) { - derOut.WriteObject(o); + o.ToAsn1Object().Encode(derOut); } derOut.WriteByte(0x00); diff --git a/crypto/src/asn1/BerSet.cs b/crypto/src/asn1/BerSet.cs index 6209e71a8..14a542106 100644 --- a/crypto/src/asn1/BerSet.cs +++ b/crypto/src/asn1/BerSet.cs @@ -53,7 +53,7 @@ namespace Org.BouncyCastle.Asn1 foreach (Asn1Encodable o in this) { - derOut.WriteObject(o); + o.ToAsn1Object().Encode(derOut); } derOut.WriteByte(0x00); diff --git a/crypto/src/asn1/DerSequence.cs b/crypto/src/asn1/DerSequence.cs index 7940f6b5a..9d5951418 100644 --- a/crypto/src/asn1/DerSequence.cs +++ b/crypto/src/asn1/DerSequence.cs @@ -67,7 +67,7 @@ namespace Org.BouncyCastle.Asn1 foreach (Asn1Encodable obj in this) { - dOut.WriteObject(obj); + obj.ToAsn1Object().Encode(dOut); } dOut.Flush(); diff --git a/crypto/src/asn1/DerSet.cs b/crypto/src/asn1/DerSet.cs index bf618ae46..3818d286f 100644 --- a/crypto/src/asn1/DerSet.cs +++ b/crypto/src/asn1/DerSet.cs @@ -84,7 +84,7 @@ namespace Org.BouncyCastle.Asn1 foreach (Asn1Encodable obj in this) { - dOut.WriteObject(obj); + obj.ToAsn1Object().Encode(dOut); } dOut.Flush(); |