Default to hx509_signature_ecdsa_with_sha1 since private crypto
backend must be the one that selects the credential since the ec group might not be able to handle sha256. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24665 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -315,6 +315,8 @@ ecdsa_create_signature(hx509_context context,
|
|||||||
|
|
||||||
if (der_heim_oid_cmp(sig_oid, oid_id_ecdsa_with_SHA256()) == 0) {
|
if (der_heim_oid_cmp(sig_oid, oid_id_ecdsa_with_SHA256()) == 0) {
|
||||||
digest_alg = hx509_signature_sha256();
|
digest_alg = hx509_signature_sha256();
|
||||||
|
} else if (der_heim_oid_cmp(sig_oid, oid_id_ecdsa_with_SHA1()) == 0) {
|
||||||
|
digest_alg = hx509_signature_sha1();
|
||||||
} else
|
} else
|
||||||
return HX509_ALG_NOT_SUPP;
|
return HX509_ALG_NOT_SUPP;
|
||||||
|
|
||||||
@@ -1314,7 +1316,7 @@ static struct key2sigalg {
|
|||||||
const AlgorithmIdentifier *(*sigalg)(void);
|
const AlgorithmIdentifier *(*sigalg)(void);
|
||||||
} key2sigalgs[] = {
|
} key2sigalgs[] = {
|
||||||
{ oid_id_pkcs1_rsaEncryption, hx509_signature_rsa_with_sha256 },
|
{ oid_id_pkcs1_rsaEncryption, hx509_signature_rsa_with_sha256 },
|
||||||
{ oid_id_ecPublicKey, hx509_signature_ecdsa_with_sha256 }
|
{ oid_id_ecPublicKey, hx509_signature_ecdsa_with_sha1 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user