List also non-fetchable hashes in openssl dgst -list

CLA: trivial

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20651)
This commit is contained in:
GauriSpears 2023-03-30 16:30:59 +05:00 committed by Tomas Mraz
parent 8b7b9aac44
commit 7eab7680ee
1 changed files with 5 additions and 2 deletions

View File

@ -488,8 +488,11 @@ static void show_digests(const OBJ_NAME *name, void *arg)
/* Filter out message digests that we cannot use */
md = EVP_MD_fetch(app_get0_libctx(), name->name, app_get0_propq());
if (md == NULL)
return;
if (md == NULL) {
md = EVP_get_digestbyname(name->name);
if (md == NULL)
return;
}
BIO_printf(dec->bio, "-%-25s", name->name);
if (++dec->n == 3) {