private-key: Add optional parameters argument to sign() method
This commit is contained in:
@@ -763,7 +763,7 @@ static bool build_ac(private_x509_ac_t *this)
|
||||
chunk_t signatureValue, attributeCertificateInfo;
|
||||
|
||||
attributeCertificateInfo = build_attr_cert_info(this);
|
||||
if (!this->signerKey->sign(this->signerKey, SIGN_RSA_EMSA_PKCS1_SHA1,
|
||||
if (!this->signerKey->sign(this->signerKey, SIGN_RSA_EMSA_PKCS1_SHA1, NULL,
|
||||
attributeCertificateInfo, &signatureValue))
|
||||
{
|
||||
free(attributeCertificateInfo.ptr);
|
||||
|
||||
@@ -2562,7 +2562,8 @@ static bool generate(private_x509_cert_t *cert, certificate_t *sign_cert,
|
||||
subject->get_encoding(subject),
|
||||
key_info, extensions);
|
||||
|
||||
if (!sign_key->sign(sign_key, scheme, cert->tbsCertificate, &cert->signature))
|
||||
if (!sign_key->sign(sign_key, scheme, NULL, cert->tbsCertificate,
|
||||
&cert->signature))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -787,7 +787,7 @@ static bool generate(private_x509_crl_t *this, certificate_t *cert,
|
||||
asn1_wrap(ASN1_SEQUENCE, "m", certList),
|
||||
extensions);
|
||||
|
||||
if (!key->sign(key, signature_scheme_from_oid(this->algorithm),
|
||||
if (!key->sign(key, signature_scheme_from_oid(this->algorithm), NULL,
|
||||
this->tbsCertList, &this->signature))
|
||||
{
|
||||
return FALSE;
|
||||
|
||||
@@ -276,7 +276,7 @@ static chunk_t build_optionalSignature(private_x509_ocsp_request_t *this,
|
||||
return chunk_empty;
|
||||
}
|
||||
|
||||
if (!this->key->sign(this->key, scheme, tbsRequest, &signature))
|
||||
if (!this->key->sign(this->key, scheme, NULL, tbsRequest, &signature))
|
||||
{
|
||||
DBG1(DBG_LIB, "creating OCSP signature failed, skipped");
|
||||
return chunk_empty;
|
||||
|
||||
@@ -584,7 +584,7 @@ static bool generate(private_x509_pkcs10_t *cert, private_key_t *sign_key,
|
||||
key_info,
|
||||
attributes);
|
||||
|
||||
if (!sign_key->sign(sign_key, scheme, cert->certificationRequestInfo,
|
||||
if (!sign_key->sign(sign_key, scheme, NULL, cert->certificationRequestInfo,
|
||||
&cert->signature))
|
||||
{
|
||||
return FALSE;
|
||||
|
||||
Reference in New Issue
Block a user