From f7a4914baf61fb71f93dd62029089a3599e9b17b Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Sun, 8 Nov 2015 10:17:25 +0700 Subject: Missed a Close/Dispose change --- crypto/src/x509/X509V3CertificateGenerator.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'crypto/src/x509/X509V3CertificateGenerator.cs') 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( -- cgit 1.4.1