pki: Query private key for supported signature schemes
This commit is contained in:
@@ -228,6 +228,11 @@ static int acert()
|
||||
goto end;
|
||||
}
|
||||
scheme = get_signature_scheme(private, digest, pss);
|
||||
if (!scheme)
|
||||
{
|
||||
error = "no signature scheme found";
|
||||
goto end;
|
||||
}
|
||||
|
||||
ac = lib->creds->create(lib->creds,
|
||||
CRED_CERTIFICATE, CERT_X509_AC,
|
||||
|
||||
@@ -536,6 +536,11 @@ static int issue()
|
||||
chunk_from_chars(ASN1_SEQUENCE, 0));
|
||||
}
|
||||
scheme = get_signature_scheme(private, digest, pss);
|
||||
if (!scheme)
|
||||
{
|
||||
error = "no signature scheme found";
|
||||
goto end;
|
||||
}
|
||||
|
||||
cert = lib->creds->create(lib->creds, CRED_CERTIFICATE, CERT_X509,
|
||||
BUILD_SIGNING_KEY, private, BUILD_SIGNING_CERT, ca,
|
||||
|
||||
@@ -168,6 +168,11 @@ static int req()
|
||||
goto end;
|
||||
}
|
||||
scheme = get_signature_scheme(private, digest, pss);
|
||||
if (!scheme)
|
||||
{
|
||||
error = "no signature scheme found";
|
||||
goto end;
|
||||
}
|
||||
|
||||
cert = lib->creds->create(lib->creds, CRED_CERTIFICATE, CERT_PKCS10_REQUEST,
|
||||
BUILD_SIGNING_KEY, private,
|
||||
|
||||
@@ -378,6 +378,11 @@ static int self()
|
||||
rng->destroy(rng);
|
||||
}
|
||||
scheme = get_signature_scheme(private, digest, pss);
|
||||
if (!scheme)
|
||||
{
|
||||
error = "no signature scheme found";
|
||||
goto end;
|
||||
}
|
||||
|
||||
cert = lib->creds->create(lib->creds, CRED_CERTIFICATE, CERT_X509,
|
||||
BUILD_SIGNING_KEY, private, BUILD_PUBLIC_KEY, public,
|
||||
|
||||
@@ -399,6 +399,12 @@ static int sign_crl()
|
||||
chunk_increment(crl_serial);
|
||||
|
||||
scheme = get_signature_scheme(private, digest, pss);
|
||||
if (!scheme)
|
||||
{
|
||||
error = "no signature scheme found";
|
||||
goto error;
|
||||
}
|
||||
|
||||
enumerator = enumerator_create_filter(list->create_enumerator(list),
|
||||
filter, NULL, NULL);
|
||||
crl = lib->creds->create(lib->creds, CRED_CERTIFICATE, CERT_X509_CRL,
|
||||
|
||||
Reference in New Issue
Block a user