diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2015-11-04 16:11:28 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2015-11-04 16:11:28 +0700 |
commit | ed2134bdcf763b2b6a11742911b4c5efd1de4550 (patch) | |
tree | b23f6dfb1ee88ddc393276229c014204b42aea22 /crypto/src/x509 | |
parent | Perform counter increment without branches (diff) | |
download | BouncyCastle.NET-ed25519-ed2134bdcf763b2b6a11742911b4c5efd1de4550.tar.xz |
Change Close calls to Dispose calls for PORTABLE
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 |
6 files changed, 12 insertions, 10 deletions
diff --git a/crypto/src/x509/X509Certificate.cs b/crypto/src/x509/X509Certificate.cs index 9c65f095a..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.Close(); + 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 087aab23c..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.Close(); + 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 79e3862e4..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.Close(); + 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 9de9cb538..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.Close(); + Platform.Dispose(streamCalculator.Stream); } catch (IOException e) { diff --git a/crypto/src/x509/X509V2AttributeCertificateGenerator.cs b/crypto/src/x509/X509V2AttributeCertificateGenerator.cs index 8fd5dfdb9..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.Close(); + Platform.Dispose(streamCalculator.Stream); Asn1EncodableVector v = new Asn1EncodableVector(); diff --git a/crypto/src/x509/X509V2CRLGenerator.cs b/crypto/src/x509/X509V2CRLGenerator.cs index 6c9ffe7e5..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.Close(); + Platform.Dispose(streamCalculator.Stream); return GenerateJcaObject(tbsCertList, (AlgorithmIdentifier)signatureCalculatorFactory.AlgorithmDetails, ((IBlockResult)streamCalculator.GetResult()).Collect()); } |