diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2015-11-08 10:17:25 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2015-11-08 10:17:25 +0700 |
commit | f7a4914baf61fb71f93dd62029089a3599e9b17b (patch) | |
tree | a0dd3e17d424b707acf91ec075a54c6d0804c8c0 /crypto/src/x509/X509V3CertificateGenerator.cs | |
parent | Use utility method from Enums to avoid platform-specific code here (diff) | |
download | BouncyCastle.NET-ed25519-f7a4914baf61fb71f93dd62029089a3599e9b17b.tar.xz |
Missed a Close/Dispose change
Diffstat (limited to 'crypto/src/x509/X509V3CertificateGenerator.cs')
-rw-r--r-- | crypto/src/x509/X509V3CertificateGenerator.cs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/crypto/src/x509/X509V3CertificateGenerator.cs b/crypto/src/x509/X509V3CertificateGenerator.cs index 51488bd2a..bc619c37b 100644 --- a/crypto/src/x509/X509V3CertificateGenerator.cs +++ b/crypto/src/x509/X509V3CertificateGenerator.cs @@ -1,15 +1,14 @@ using System; using System.Collections; -using System.IO; using Org.BouncyCastle.Asn1; using Org.BouncyCastle.Asn1.X509; using Org.BouncyCastle.Crypto; using Org.BouncyCastle.Crypto.Operators; -using Org.BouncyCastle.Crypto.Parameters; using Org.BouncyCastle.Math; using Org.BouncyCastle.Security; using Org.BouncyCastle.Security.Certificates; +using Org.BouncyCastle.Utilities; using Org.BouncyCastle.X509.Extension; namespace Org.BouncyCastle.X509 @@ -318,11 +317,11 @@ namespace Org.BouncyCastle.X509 byte[] encoded = tbsCert.GetDerEncoded(); - streamCalculator.Stream.Write (encoded, 0, encoded.Length); + streamCalculator.Stream.Write(encoded, 0, encoded.Length); - streamCalculator.Stream.Close (); + Platform.Dispose(streamCalculator.Stream); - return GenerateJcaObject(tbsCert, (AlgorithmIdentifier)signatureCalculatorFactory.AlgorithmDetails, ((IBlockResult)streamCalculator.GetResult()).Collect()); + return GenerateJcaObject(tbsCert, (AlgorithmIdentifier)signatureCalculatorFactory.AlgorithmDetails, ((IBlockResult)streamCalculator.GetResult()).Collect()); } private X509Certificate GenerateJcaObject( |