From 510ceb7d6b857d8d50059fc63fccf64eeb207bf4 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Tue, 25 Jul 2023 18:02:45 +0700 Subject: Make DL encoding public in Asn1 API --- crypto/src/asn1/Asn1OutputStream.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'crypto/src/asn1/Asn1OutputStream.cs') 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; } -- cgit 1.4.1