ASN1: Make ASN1_item_verify_ctx() work with provider-native keys

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/12587)
This commit is contained in:
Richard Levitte 2020-09-01 17:56:11 +02:00
parent 5045abb2e9
commit d55d0935de

View File

@ -163,7 +163,7 @@ int ASN1_item_verify_ctx(const ASN1_ITEM *it, const X509_ALGOR *alg,
}
/* Check public key OID matches public key type */
if (EVP_PKEY_type(pknid) != pkey->ameth->pkey_id) {
if (!EVP_PKEY_is_a(pkey, OBJ_nid2sn(pknid))) {
ASN1err(0, ASN1_R_WRONG_PUBLIC_KEY_TYPE);
goto err;
}