summary refs log tree commit diff
path: root/crypto/src/asn1/DerOutputStream.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2021-10-14 14:17:03 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2021-10-14 14:17:03 +0700
commitbd5c69224e0c177298607503ed4e2a50776a8370 (patch)
tree4efe6b206a421bbe9813544f6c17818496d59684 /crypto/src/asn1/DerOutputStream.cs
parentObsolete BerOutputStream (diff)
downloadBouncyCastle.NET-ed25519-bd5c69224e0c177298607503ed4e2a50776a8370.tar.xz
Obsolete DerOutputStream
Diffstat (limited to 'crypto/src/asn1/DerOutputStream.cs')
-rw-r--r--crypto/src/asn1/DerOutputStream.cs20
1 files changed, 18 insertions, 2 deletions
diff --git a/crypto/src/asn1/DerOutputStream.cs b/crypto/src/asn1/DerOutputStream.cs
index c9c70a3f3..3ecdcd11f 100644
--- a/crypto/src/asn1/DerOutputStream.cs
+++ b/crypto/src/asn1/DerOutputStream.cs
@@ -5,9 +5,11 @@ using Org.BouncyCastle.Utilities.IO;
 
 namespace Org.BouncyCastle.Asn1
 {
+    [Obsolete("Use 'Asn1OutputStream' instead")]
     public class DerOutputStream
         : FilterStream
     {
+        [Obsolete("Use 'Asn1OutputStream.Create' instead")]
         public DerOutputStream(Stream os)
             : base(os)
         {
@@ -134,7 +136,7 @@ namespace Org.BouncyCastle.Asn1
 			}
 			else
 			{
-				obj.ToAsn1Object().Encode(this);
+				obj.ToAsn1Object().Encode(new DerOutputStreamNew(s));
 			}
 		}
 
@@ -147,8 +149,22 @@ namespace Org.BouncyCastle.Asn1
 			}
 			else
 			{
-				obj.Encode(this);
+				obj.Encode(new DerOutputStreamNew(s));
 			}
 		}
 	}
+
+    internal class DerOutputStreamNew
+        : Asn1OutputStream
+    {
+        internal DerOutputStreamNew(Stream os)
+            : base(os)
+        {
+        }
+
+        internal override bool IsBer
+        {
+            get { return false; }
+        }
+    }
 }