summary refs log tree commit diff
path: root/crypto/src/asn1/BEROctetStringGenerator.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2021-10-14 18:46:47 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2021-10-14 18:46:47 +0700
commitc3a6083bace63a12515b08b30e4ffa42fc74a0a0 (patch)
tree694e96380bbf30b597462be7dcefe0dc4ceb7406 /crypto/src/asn1/BEROctetStringGenerator.cs
parentAdd WriteElements method (diff)
downloadBouncyCastle.NET-ed25519-c3a6083bace63a12515b08b30e4ffa42fc74a0a0.tar.xz
More ASN.1 updates from bc-java
Diffstat (limited to 'crypto/src/asn1/BEROctetStringGenerator.cs')
-rw-r--r--crypto/src/asn1/BEROctetStringGenerator.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/crypto/src/asn1/BEROctetStringGenerator.cs b/crypto/src/asn1/BEROctetStringGenerator.cs
index de039014b..4a7f1e8e5 100644
--- a/crypto/src/asn1/BEROctetStringGenerator.cs
+++ b/crypto/src/asn1/BEROctetStringGenerator.cs
@@ -112,6 +112,8 @@ namespace Org.BouncyCastle.Asn1
 					    DerOctetString.Encode(_derOut, _buf, 0, _off);
 				    }
 
+                    _derOut.FlushInternal();
+
 				    _gen.WriteBerEnd();
                 }
                 base.Dispose(disposing);
@@ -124,7 +126,9 @@ namespace Org.BouncyCastle.Asn1
 					DerOctetString.Encode(_derOut, _buf, 0, _off);
 				}
 
-				_gen.WriteBerEnd();
+                _derOut.FlushInternal();
+
+                _gen.WriteBerEnd();
 				base.Close();
 			}
 #endif