summary refs log tree commit diff
path: root/crypto/src/asn1/BEROctetStringGenerator.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2023-03-05 14:45:49 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2023-03-05 14:45:49 +0700
commit6b59dbbece3b1509b83b8479259a3c6059e9a60b (patch)
tree3dca66ea9a1e8aa02ac6099cde5844155783bd7b /crypto/src/asn1/BEROctetStringGenerator.cs
parentRefactor Asn1Set classes (diff)
downloadBouncyCastle.NET-ed25519-6b59dbbece3b1509b83b8479259a3c6059e9a60b.tar.xz
Support 'leaveOpen' in Asn1 streams
Diffstat (limited to 'crypto/src/asn1/BEROctetStringGenerator.cs')
-rw-r--r--crypto/src/asn1/BEROctetStringGenerator.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/src/asn1/BEROctetStringGenerator.cs b/crypto/src/asn1/BEROctetStringGenerator.cs
index 5472802a2..ed2b85010 100644
--- a/crypto/src/asn1/BEROctetStringGenerator.cs
+++ b/crypto/src/asn1/BEROctetStringGenerator.cs
@@ -54,7 +54,7 @@ namespace Org.BouncyCastle.Asn1
 			{
 				_buf = buf;
 				_off = 0;
-				_derOut = Asn1OutputStream.Create(outStream, Asn1Encodable.Der);
+				_derOut = Asn1OutputStream.Create(outStream, Asn1Encodable.Der, leaveOpen: true);
 			}
 
 			public override void Write(byte[] buffer, int offset, int count)
@@ -145,7 +145,7 @@ namespace Org.BouncyCastle.Asn1
                         _off = 0;
                     }
 
-                    _derOut.FlushInternal();
+                    _derOut.Dispose();
                 }
                 base.Dispose(disposing);
             }