diff options
author | GauriSpears <Gauri@nextmail.ru> | 2023-03-30 16:30:59 +0500 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2023-04-14 14:40:41 +0200 |
commit | 7eab7680ee61c64b2ae7acd9dd199ab6734f3d1f (patch) | |
tree | 8efccc2961a900fda0855be956f9b4a494154f50 | |
parent | 8b7b9aac444625195486efd10273694830c41398 (diff) |
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)
-rw-r--r-- | apps/dgst.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/dgst.c b/apps/dgst.c index cbd4b4e2be..9d00c06472 100644 --- a/apps/dgst.c +++ b/apps/dgst.c @@ -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) { |