summary refs log tree commit diff
path: root/crypto/src/asn1/Asn1OutputStream.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/Asn1OutputStream.cs')
-rw-r--r--crypto/src/asn1/Asn1OutputStream.cs11
1 files changed, 7 insertions, 4 deletions
diff --git a/crypto/src/asn1/Asn1OutputStream.cs b/crypto/src/asn1/Asn1OutputStream.cs
index 86006877b..7dd1f7883 100644
--- a/crypto/src/asn1/Asn1OutputStream.cs
+++ b/crypto/src/asn1/Asn1OutputStream.cs
@@ -14,11 +14,12 @@ namespace Org.BouncyCastle.Asn1
         : FilterStream
     {
         internal const int EncodingBer = 1;
-        internal const int EncodingDer = 2;
+        internal const int EncodingDL = 2;
+        internal const int EncodingDer = 3;
 
         public static Asn1OutputStream Create(Stream output)
         {
-            return Create(output, Asn1Encodable.Ber);
+            return new Asn1OutputStream(output, false);
         }
 
         public static Asn1OutputStream Create(Stream output, string encoding)
@@ -30,7 +31,8 @@ namespace Org.BouncyCastle.Asn1
         {
             if (Asn1Encodable.Der.Equals(encoding))
                 return new DerOutputStream(output, leaveOpen);
-
+            if (Asn1Encodable.DL.Equals(encoding))
+                return new DLOutputStream(output, leaveOpen);
             return new Asn1OutputStream(output, leaveOpen);
         }
 
@@ -38,7 +40,8 @@ namespace Org.BouncyCastle.Asn1
         {
             if (Asn1Encodable.Der.Equals(encoding))
                 return EncodingDer;
-
+            if (Asn1Encodable.DL.Equals(encoding))
+                return EncodingDL;
             return EncodingBer;
         }