diff options
Diffstat (limited to 'crypto/src/ocsp/BasicOCSPRespGenerator.cs')
-rw-r--r-- | crypto/src/ocsp/BasicOCSPRespGenerator.cs | 14 |
1 files changed, 7 insertions, 7 deletions
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); } /** |