diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2015-11-08 17:18:27 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2015-11-08 17:18:27 +0700 |
commit | d644e956bb0dd3fe0731c3050c185f27ab6d9e1f (patch) | |
tree | 2e4464b274efeb8ce3205c7a736bd65dea7b8262 /crypto/src/x509 | |
parent | Merge pull request #10 from peterdettman/pcl (diff) | |
parent | Merge branch 'master' of git.bouncycastle.org:bc-csharp (diff) | |
download | BouncyCastle.NET-ed25519-d644e956bb0dd3fe0731c3050c185f27ab6d9e1f.tar.xz |
Merge branch 'master' of git.bouncycastle.org:bc-csharp into pcl
Diffstat (limited to 'crypto/src/x509')
-rw-r--r-- | crypto/src/x509/X509Certificate.cs | 2 | ||||
-rw-r--r-- | crypto/src/x509/X509Crl.cs | 2 | ||||
-rw-r--r-- | crypto/src/x509/X509V1CertificateGenerator.cs | 3 | ||||
-rw-r--r-- | crypto/src/x509/X509V2AttributeCertificate.cs | 4 | ||||
-rw-r--r-- | crypto/src/x509/X509V2AttributeCertificateGenerator.cs | 6 | ||||
-rw-r--r-- | crypto/src/x509/X509V2CRLGenerator.cs | 5 | ||||
-rw-r--r-- | crypto/src/x509/X509V3CertificateGenerator.cs | 9 |
7 files changed, 16 insertions, 15 deletions
diff --git a/crypto/src/x509/X509Certificate.cs b/crypto/src/x509/X509Certificate.cs index 93e3ee940..fc7f96aa9 100644 --- a/crypto/src/x509/X509Certificate.cs +++ b/crypto/src/x509/X509Certificate.cs @@ -576,7 +576,7 @@ namespace Org.BouncyCastle.X509 streamCalculator.Stream.Write(b, 0, b.Length); - streamCalculator.Stream.Dispose(); + Platform.Dispose(streamCalculator.Stream); if (!((IVerifier)streamCalculator.GetResult()).IsVerified(this.GetSignature())) { diff --git a/crypto/src/x509/X509Crl.cs b/crypto/src/x509/X509Crl.cs index 8d5cec8ef..53de3e91f 100644 --- a/crypto/src/x509/X509Crl.cs +++ b/crypto/src/x509/X509Crl.cs @@ -115,7 +115,7 @@ namespace Org.BouncyCastle.X509 streamCalculator.Stream.Write(b, 0, b.Length); - streamCalculator.Stream.Dispose(); + Platform.Dispose(streamCalculator.Stream); if (!((IVerifier)streamCalculator.GetResult()).IsVerified(this.GetSignature())) { diff --git a/crypto/src/x509/X509V1CertificateGenerator.cs b/crypto/src/x509/X509V1CertificateGenerator.cs index 1c59acba4..9adebcb16 100644 --- a/crypto/src/x509/X509V1CertificateGenerator.cs +++ b/crypto/src/x509/X509V1CertificateGenerator.cs @@ -10,6 +10,7 @@ using Org.BouncyCastle.Crypto.Operators; using Org.BouncyCastle.Math; using Org.BouncyCastle.Security; using Org.BouncyCastle.Security.Certificates; +using Org.BouncyCastle.Utilities; namespace Org.BouncyCastle.X509 { @@ -184,7 +185,7 @@ namespace Org.BouncyCastle.X509 streamCalculator.Stream.Write(encoded, 0, encoded.Length); - streamCalculator.Stream.Dispose(); + Platform.Dispose(streamCalculator.Stream); return GenerateJcaObject(tbsCert, (AlgorithmIdentifier)signatureCalculatorFactory.AlgorithmDetails, ((IBlockResult)streamCalculator.GetResult()).Collect()); } diff --git a/crypto/src/x509/X509V2AttributeCertificate.cs b/crypto/src/x509/X509V2AttributeCertificate.cs index bc9b39873..9376538a1 100644 --- a/crypto/src/x509/X509V2AttributeCertificate.cs +++ b/crypto/src/x509/X509V2AttributeCertificate.cs @@ -5,11 +5,11 @@ using System.IO; using Org.BouncyCastle.Asn1; using Org.BouncyCastle.Asn1.X509; using Org.BouncyCastle.Crypto; +using Org.BouncyCastle.Crypto.Operators; using Org.BouncyCastle.Math; using Org.BouncyCastle.Security; using Org.BouncyCastle.Security.Certificates; using Org.BouncyCastle.Utilities; -using Org.BouncyCastle.Crypto.Operators; namespace Org.BouncyCastle.X509 { @@ -186,7 +186,7 @@ namespace Org.BouncyCastle.X509 streamCalculator.Stream.Write(b, 0, b.Length); - streamCalculator.Stream.Dispose(); + Platform.Dispose(streamCalculator.Stream); } catch (IOException e) { diff --git a/crypto/src/x509/X509V2AttributeCertificateGenerator.cs b/crypto/src/x509/X509V2AttributeCertificateGenerator.cs index fc7d91050..bf046cd1e 100644 --- a/crypto/src/x509/X509V2AttributeCertificateGenerator.cs +++ b/crypto/src/x509/X509V2AttributeCertificateGenerator.cs @@ -1,15 +1,15 @@ 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.Math; using Org.BouncyCastle.Security; using Org.BouncyCastle.Security.Certificates; using Org.BouncyCastle.Utilities; -using Org.BouncyCastle.Crypto.Operators; -using System.IO; namespace Org.BouncyCastle.X509 { @@ -172,7 +172,7 @@ namespace Org.BouncyCastle.X509 streamCalculator.Stream.Write(encoded, 0, encoded.Length); - streamCalculator.Stream.Dispose(); + Platform.Dispose(streamCalculator.Stream); Asn1EncodableVector v = new Asn1EncodableVector(); diff --git a/crypto/src/x509/X509V2CRLGenerator.cs b/crypto/src/x509/X509V2CRLGenerator.cs index 93accee71..566d50234 100644 --- a/crypto/src/x509/X509V2CRLGenerator.cs +++ b/crypto/src/x509/X509V2CRLGenerator.cs @@ -5,12 +5,13 @@ 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.Utilities.Collections; -using Org.BouncyCastle.Crypto.Operators; namespace Org.BouncyCastle.X509 { @@ -241,7 +242,7 @@ namespace Org.BouncyCastle.X509 streamCalculator.Stream.Write(encoded, 0, encoded.Length); - streamCalculator.Stream.Dispose(); + Platform.Dispose(streamCalculator.Stream); return GenerateJcaObject(tbsCertList, (AlgorithmIdentifier)signatureCalculatorFactory.AlgorithmDetails, ((IBlockResult)streamCalculator.GetResult()).Collect()); } diff --git a/crypto/src/x509/X509V3CertificateGenerator.cs b/crypto/src/x509/X509V3CertificateGenerator.cs index 2830a19dc..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.Dispose (); + 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( |