summary refs log tree commit diff
path: root/crypto/src/asn1/BERGenerator.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/BERGenerator.cs')
-rw-r--r--crypto/src/asn1/BERGenerator.cs10
1 files changed, 4 insertions, 6 deletions
diff --git a/crypto/src/asn1/BERGenerator.cs b/crypto/src/asn1/BERGenerator.cs
index f5465b756..0b9c43b13 100644
--- a/crypto/src/asn1/BERGenerator.cs
+++ b/crypto/src/asn1/BERGenerator.cs
@@ -28,16 +28,14 @@ namespace Org.BouncyCastle.Asn1
             _tagNo = tagNo;
         }
 
-		public override void AddObject(
-			Asn1Encodable obj)
+		public override void AddObject(Asn1Encodable obj)
 		{
-			new Asn1OutputStream(Out).WriteObject(obj);
+            obj.EncodeTo(Out);
 		}
 
-        public override void AddObject(
-            Asn1Object obj)
+        public override void AddObject(Asn1Object obj)
         {
-            new Asn1OutputStream(Out).WriteObject(obj);
+            obj.EncodeTo(Out);
         }
 
         public override Stream GetRawOutputStream()