diff options
Diffstat (limited to 'crypto/src/ocsp')
-rw-r--r-- | crypto/src/ocsp/BasicOCSPResp.cs | 6 | ||||
-rw-r--r-- | crypto/src/ocsp/BasicOCSPRespGenerator.cs | 14 | ||||
-rw-r--r-- | crypto/src/ocsp/CertificateID.cs | 4 | ||||
-rw-r--r-- | crypto/src/ocsp/OCSPReq.cs | 6 |
4 files changed, 15 insertions, 15 deletions
diff --git a/crypto/src/ocsp/BasicOCSPResp.cs b/crypto/src/ocsp/BasicOCSPResp.cs index 4253726bb..63ab8921e 100644 --- a/crypto/src/ocsp/BasicOCSPResp.cs +++ b/crypto/src/ocsp/BasicOCSPResp.cs @@ -95,12 +95,12 @@ namespace Org.BouncyCastle.Ocsp public string SignatureAlgName { - get { return OcspUtilities.GetAlgorithmName(resp.SignatureAlgorithm.ObjectID); } + get { return OcspUtilities.GetAlgorithmName(resp.SignatureAlgorithm.Algorithm); } } public string SignatureAlgOid { - get { return resp.SignatureAlgorithm.ObjectID.Id; } + get { return resp.SignatureAlgorithm.Algorithm.Id; } } [Obsolete("RespData class is no longer required as all functionality is available on this class")] @@ -111,7 +111,7 @@ namespace Org.BouncyCastle.Ocsp public byte[] GetSignature() { - return resp.Signature.GetBytes(); + return resp.GetSignatureOctets(); } private IList GetCertList() diff --git a/crypto/src/ocsp/BasicOCSPRespGenerator.cs b/crypto/src/ocsp/BasicOCSPRespGenerator.cs index 9735ba177..0dd4e0a09 100644 --- a/crypto/src/ocsp/BasicOCSPRespGenerator.cs +++ b/crypto/src/ocsp/BasicOCSPRespGenerator.cs @@ -185,7 +185,7 @@ namespace Org.BouncyCastle.Ocsp } private BasicOcspResp GenerateResponse( - ISignatureCalculator signatureCalculator, + ISignatureFactory signatureCalculator, X509Certificate[] chain, DateTime producedAt) { @@ -217,7 +217,7 @@ namespace Org.BouncyCastle.Ocsp streamCalculator.Stream.Write(encoded, 0, encoded.Length); - streamCalculator.Stream.Close(); + Platform.Dispose(streamCalculator.Stream); bitSig = new DerBitString(((IBlockResult)streamCalculator.GetResult()).Collect()); } @@ -277,27 +277,27 @@ namespace Org.BouncyCastle.Ocsp throw new ArgumentException("no signing algorithm specified"); } - return GenerateResponse(new Asn1SignatureCalculator(signingAlgorithm, privateKey, random), chain, producedAt); + return GenerateResponse(new Asn1SignatureFactory(signingAlgorithm, privateKey, random), chain, producedAt); } /// <summary> /// Generate the signed response using the passed in signature calculator. /// </summary> - /// <param name="signatureCalculator">Implementation of signing calculator.</param> + /// <param name="signatureCalculatorFactory">Implementation of signing calculator factory.</param> /// <param name="chain">The certificate chain associated with the response signer.</param> /// <param name="producedAt">"produced at" date.</param> /// <returns></returns> public BasicOcspResp Generate( - ISignatureCalculator signatureCalculator, + ISignatureFactory signatureCalculatorFactory, X509Certificate[] chain, DateTime producedAt) { - if (signatureCalculator == null) + if (signatureCalculatorFactory == null) { throw new ArgumentException("no signature calculator specified"); } - return GenerateResponse(signatureCalculator, chain, producedAt); + return GenerateResponse(signatureCalculatorFactory, chain, producedAt); } /** diff --git a/crypto/src/ocsp/CertificateID.cs b/crypto/src/ocsp/CertificateID.cs index a8f035759..ec902d5c3 100644 --- a/crypto/src/ocsp/CertificateID.cs +++ b/crypto/src/ocsp/CertificateID.cs @@ -43,7 +43,7 @@ namespace Org.BouncyCastle.Ocsp public string HashAlgOid { - get { return id.HashAlgorithm.ObjectID.Id; } + get { return id.HashAlgorithm.Algorithm.Id; } } public byte[] GetIssuerNameHash() @@ -118,7 +118,7 @@ namespace Org.BouncyCastle.Ocsp { try { - String hashAlgorithm = hashAlg.ObjectID.Id; + String hashAlgorithm = hashAlg.Algorithm.Id; X509Name issuerName = PrincipalUtilities.GetSubjectX509Principal(issuerCert); byte[] issuerNameHash = DigestUtilities.CalculateDigest( diff --git a/crypto/src/ocsp/OCSPReq.cs b/crypto/src/ocsp/OCSPReq.cs index 84808e50a..0cd95c6d6 100644 --- a/crypto/src/ocsp/OCSPReq.cs +++ b/crypto/src/ocsp/OCSPReq.cs @@ -144,7 +144,7 @@ namespace Org.BouncyCastle.Ocsp if (!this.IsSigned) return null; - return req.OptionalSignature.SignatureAlgorithm.ObjectID.Id; + return req.OptionalSignature.SignatureAlgorithm.Algorithm.Id; } } @@ -153,10 +153,10 @@ namespace Org.BouncyCastle.Ocsp if (!this.IsSigned) return null; - return req.OptionalSignature.SignatureValue.GetBytes(); + return req.OptionalSignature.GetSignatureOctets(); } - private IList GetCertList() + private IList GetCertList() { // load the certificates if we have any |