diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2017-09-04 18:33:23 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2017-09-04 18:33:23 +0700 |
commit | a2e097a4029d8ac7e1345d7569a4ad5d466ea2db (patch) | |
tree | cc84c4b0d6ed50b040c6dc4c23ef0df9a465d5be /crypto/src/bcpg | |
parent | Update handling of implicitly-tagged OIDs (from bc-java) (diff) | |
download | BouncyCastle.NET-ed25519-a2e097a4029d8ac7e1345d7569a4ad5d466ea2db.tar.xz |
Fix ResetHeaders to preserve the existing version as intended
Diffstat (limited to 'crypto/src/bcpg')
-rw-r--r-- | crypto/src/bcpg/ArmoredOutputStream.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/src/bcpg/ArmoredOutputStream.cs b/crypto/src/bcpg/ArmoredOutputStream.cs index 7a5066ec3..82e7cc1f0 100644 --- a/crypto/src/bcpg/ArmoredOutputStream.cs +++ b/crypto/src/bcpg/ArmoredOutputStream.cs @@ -147,13 +147,13 @@ namespace Org.BouncyCastle.Bcpg */ public void ResetHeaders() { - string version = (string)headers[HeaderVersion]; + string existingVersion = (string)headers[HeaderVersion]; headers.Clear(); - if (version != null) + if (existingVersion != null) { - headers[HeaderVersion] = Version; + headers.Add(HeaderVersion, existingVersion); } } |