From 90c1946e7a3aaabaed630474304485b7c850cfa6 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Sun, 29 Jun 2014 23:25:59 +0100 Subject: [PATCH] Don't core dump when using CMAC with dgst. We can't unfortunately print the CMAC cipher used without extending the API. PR#2579 --- apps/dgst.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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