log actual NID causing the 'unknown message digest algorithm error'

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21214)
This commit is contained in:
Vladimír Kotal 2023-06-15 17:03:21 +02:00 committed by Pauli
parent d808fa0151
commit f52aec3526

View File

@ -180,8 +180,9 @@ int ASN1_item_verify_ctx(const ASN1_ITEM *it, const X509_ALGOR *alg,
if (mdnid != NID_undef) {
type = EVP_get_digestbynid(mdnid);
if (type == NULL) {
ERR_raise(ERR_LIB_ASN1,
ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM);
ERR_raise_data(ERR_LIB_ASN1,
ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM,
"nid=0x%x", mdnid);
goto err;
}
}