summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--crypto/src/asn1/ASN1Generator.cs4
-rw-r--r--crypto/src/asn1/BERGenerator.cs12
-rw-r--r--crypto/src/asn1/DERSequenceGenerator.cs8
-rw-r--r--crypto/src/asn1/DERSetGenerator.cs8
4 files changed, 26 insertions, 6 deletions
diff --git a/crypto/src/asn1/ASN1Generator.cs b/crypto/src/asn1/ASN1Generator.cs
index e56051736..d064b803a 100644
--- a/crypto/src/asn1/ASN1Generator.cs
+++ b/crypto/src/asn1/ASN1Generator.cs
@@ -20,7 +20,9 @@ namespace Org.BouncyCastle.Asn1
 
 		public abstract void AddObject(Asn1Encodable obj);
 
-		public abstract Stream GetRawOutputStream();
+        public abstract void AddObject(Asn1Object obj);
+
+        public abstract Stream GetRawOutputStream();
 
 		public abstract void Close();
     }
diff --git a/crypto/src/asn1/BERGenerator.cs b/crypto/src/asn1/BERGenerator.cs
index 271572c02..ad72e7a31 100644
--- a/crypto/src/asn1/BERGenerator.cs
+++ b/crypto/src/asn1/BERGenerator.cs
@@ -4,7 +4,7 @@ using Org.BouncyCastle.Utilities.IO;
 
 namespace Org.BouncyCastle.Asn1
 {
-    public class BerGenerator
+    public abstract class BerGenerator
         : Asn1Generator
     {
         private bool      _tagged = false;
@@ -17,7 +17,7 @@ namespace Org.BouncyCastle.Asn1
         {
         }
 
-        public BerGenerator(
+        protected BerGenerator(
             Stream outStream,
             int tagNo,
             bool isExplicit)
@@ -34,7 +34,13 @@ namespace Org.BouncyCastle.Asn1
 			new BerOutputStream(Out).WriteObject(obj);
 		}
 
-		public override Stream GetRawOutputStream()
+        public override void AddObject(
+            Asn1Object obj)
+        {
+            new BerOutputStream(Out).WriteObject(obj);
+        }
+
+        public override Stream GetRawOutputStream()
         {
             return Out;
         }
diff --git a/crypto/src/asn1/DERSequenceGenerator.cs b/crypto/src/asn1/DERSequenceGenerator.cs
index 4c2bfd012..c4348c78d 100644
--- a/crypto/src/asn1/DERSequenceGenerator.cs
+++ b/crypto/src/asn1/DERSequenceGenerator.cs
@@ -27,7 +27,13 @@ namespace Org.BouncyCastle.Asn1
 			new DerOutputStream(_bOut).WriteObject(obj);
 		}
 
-		public override Stream GetRawOutputStream()
+        public override void AddObject(
+            Asn1Object obj)
+        {
+            new DerOutputStream(_bOut).WriteObject(obj);
+        }
+
+        public override Stream GetRawOutputStream()
 		{
 			return _bOut;
 		}
diff --git a/crypto/src/asn1/DERSetGenerator.cs b/crypto/src/asn1/DERSetGenerator.cs
index 455ca88ac..a25dd7de8 100644
--- a/crypto/src/asn1/DERSetGenerator.cs
+++ b/crypto/src/asn1/DERSetGenerator.cs
@@ -27,7 +27,13 @@ namespace Org.BouncyCastle.Asn1
 			new DerOutputStream(_bOut).WriteObject(obj);
 		}
 
-		public override Stream GetRawOutputStream()
+        public override void AddObject(
+            Asn1Object obj)
+        {
+            new DerOutputStream(_bOut).WriteObject(obj);
+        }
+
+        public override Stream GetRawOutputStream()
 		{
 			return _bOut;
 		}