From da484dcb85bdeae6b2f8b9e81ba03be67cae5764 Mon Sep 17 00:00:00 2001 From: David Hook Date: Sat, 24 Oct 2015 10:59:46 +1100 Subject: comment update --- crypto/src/cms/SignerInfoGenerator.cs | 13 ++++++------- crypto/src/ocsp/BasicOCSPRespGenerator.cs | 8 ++++---- crypto/src/pkcs/Pkcs10CertificationRequest.cs | 8 ++++---- 3 files changed, 14 insertions(+), 15 deletions(-) (limited to 'crypto') diff --git a/crypto/src/cms/SignerInfoGenerator.cs b/crypto/src/cms/SignerInfoGenerator.cs index 69196bdd1..67600dea4 100644 --- a/crypto/src/cms/SignerInfoGenerator.cs +++ b/crypto/src/cms/SignerInfoGenerator.cs @@ -23,15 +23,15 @@ namespace Org.BouncyCastle.Cms internal CmsAttributeTableGenerator unsignedGen; private bool isDirectSignature; - internal SignerInfoGenerator(SignerIdentifier sigId, ISignatureCalculatorFactory contentSigner): this(sigId, contentSigner, false) + internal SignerInfoGenerator(SignerIdentifier sigId, ISignatureCalculatorFactory signerFactory): this(sigId, signerFactory, false) { } - internal SignerInfoGenerator(SignerIdentifier sigId, ISignatureCalculatorFactory contentSigner, bool isDirectSignature) + internal SignerInfoGenerator(SignerIdentifier sigId, ISignatureCalculatorFactory signerFactory, bool isDirectSignature) { this.sigId = sigId; - this.contentSigner = contentSigner; + this.contentSigner = signerFactory; this.isDirectSignature = isDirectSignature; if (this.isDirectSignature) { @@ -132,16 +132,15 @@ namespace Org.BouncyCastle.Cms * Build a generator with the passed in subjectKeyIdentifier as the signerIdentifier. If used you should * try to follow the calculation described in RFC 5280 section 4.2.1.2. * - * @param contentSigner operator for generating the final signature in the SignerInfo with. + * @param signerFactory operator factory for generating the final signature in the SignerInfo with. * @param subjectKeyIdentifier key identifier to identify the public key for verifying the signature. * @return a SignerInfoGenerator - * @throws OperatorCreationException if the generator cannot be built. */ - public SignerInfoGenerator Build(ISignatureCalculatorFactory contentSigner, byte[] subjectKeyIdentifier) + public SignerInfoGenerator Build(ISignatureCalculatorFactory signerFactory, byte[] subjectKeyIdentifier) { SignerIdentifier sigId = new SignerIdentifier(new DerOctetString(subjectKeyIdentifier)); - return CreateGenerator(contentSigner, sigId); + return CreateGenerator(signerFactory, sigId); } private SignerInfoGenerator CreateGenerator(ISignatureCalculatorFactory contentSigner, SignerIdentifier sigId) diff --git a/crypto/src/ocsp/BasicOCSPRespGenerator.cs b/crypto/src/ocsp/BasicOCSPRespGenerator.cs index 14307c3ee..508d94ec5 100644 --- a/crypto/src/ocsp/BasicOCSPRespGenerator.cs +++ b/crypto/src/ocsp/BasicOCSPRespGenerator.cs @@ -283,21 +283,21 @@ namespace Org.BouncyCastle.Ocsp /// /// Generate the signed response using the passed in signature calculator. /// - /// Implementation of signing calculator. + /// Implementation of signing calculator factory. /// The certificate chain associated with the response signer. /// "produced at" date. /// public BasicOcspResp Generate( - ISignatureCalculatorFactory signatureCalculator, + ISignatureCalculatorFactory 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/pkcs/Pkcs10CertificationRequest.cs b/crypto/src/pkcs/Pkcs10CertificationRequest.cs index 1638dcb23..692ab2bd3 100644 --- a/crypto/src/pkcs/Pkcs10CertificationRequest.cs +++ b/crypto/src/pkcs/Pkcs10CertificationRequest.cs @@ -234,19 +234,19 @@ namespace Org.BouncyCastle.Pkcs /// /// Instantiate a Pkcs10CertificationRequest object with the necessary credentials. /// - ///The signature calculator to sign the PKCS#10 request with. + ///The factory for signature calculators to sign the PKCS#10 request with. /// X509Name of subject eg OU="My unit." O="My Organisatioin" C="au" /// Public Key to be included in cert reqest. /// ASN1Set of Attributes. /// Matching Private key for nominated (above) public key to be used to sign the request. public Pkcs10CertificationRequest( - ISignatureCalculatorFactory signatureCalculator, + ISignatureCalculatorFactory signatureCalculatorFactory, X509Name subject, AsymmetricKeyParameter publicKey, Asn1Set attributes, AsymmetricKeyParameter signingKey) { - if (signatureCalculator == null) + if (signatureCalculatorFactory == null) throw new ArgumentNullException("signatureCalculator"); if (subject == null) throw new ArgumentNullException("subject"); @@ -257,7 +257,7 @@ namespace Org.BouncyCastle.Pkcs if (!signingKey.IsPrivate) throw new ArgumentException("key for signing must be private", "signingKey"); - init(signatureCalculator, subject, publicKey, attributes, signingKey); + init(signatureCalculatorFactory, subject, publicKey, attributes, signingKey); } private void init( -- cgit 1.4.1