summary refs log tree commit diff
path: root/crypto/src/pkcs/Pkcs12Store.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/pkcs/Pkcs12Store.cs
parentObsolete BerOutputStream (diff)
downloadBouncyCastle.NET-ed25519-bd5c69224e0c177298607503ed4e2a50776a8370.tar.xz
Obsolete DerOutputStream
Diffstat (limited to 'crypto/src/pkcs/Pkcs12Store.cs')
-rw-r--r--crypto/src/pkcs/Pkcs12Store.cs11
1 files changed, 2 insertions, 9 deletions
diff --git a/crypto/src/pkcs/Pkcs12Store.cs b/crypto/src/pkcs/Pkcs12Store.cs
index f09198694..2d7de67e6 100644
--- a/crypto/src/pkcs/Pkcs12Store.cs
+++ b/crypto/src/pkcs/Pkcs12Store.cs
@@ -1030,15 +1030,8 @@ namespace Org.BouncyCastle.Pkcs
             //
             Pfx pfx = new Pfx(mainInfo, macData);
 
-            DerOutputStream derOut;
-            if (useDerEncoding)
-            {
-                derOut = new DerOutputStream(stream);
-            }
-            else
-            {
-                derOut = new Asn1OutputStream(stream);
-            }
+            Asn1OutputStream derOut = Asn1OutputStream.Create(stream,
+                useDerEncoding ? Asn1Encodable.Der : Asn1Encodable.Ber);
 
             derOut.WriteObject(pfx);
         }