summary refs log tree commit diff
path: root/crypto/src
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src')
-rw-r--r--crypto/src/asn1/Asn1Encodable.cs4
-rw-r--r--crypto/src/asn1/BerOctetString.cs2
-rw-r--r--crypto/src/asn1/BerSequence.cs2
-rw-r--r--crypto/src/asn1/BerSet.cs2
-rw-r--r--crypto/src/asn1/DerSequence.cs2
-rw-r--r--crypto/src/asn1/DerSet.cs2
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();