diff --git a/apps/dgst.c b/apps/dgst.c index d471dbdabd..19c9424be2 100644 --- a/apps/dgst.c +++ b/apps/dgst.c @@ -529,7 +529,8 @@ int MAIN(int argc, char **argv) EVP_PKEY_asn1_get0_info(NULL, NULL, NULL, NULL, &sig_name, ameth); } - md_name = EVP_MD_name(md); + if (md) + md_name = EVP_MD_name(md); } err = 0; for (i=0; i