X-Git-Url: https://git.openssl.org/?a=blobdiff_plain;f=apps%2Fdgst.c;fp=apps%2Fdgst.c;h=7ac101330351c881ccb400e2e815f313f95717b7;hb=819b94c0c0d338fbec0aee828f3b61d7878c3837;hp=15f9e2e6850dcb2be751f5f7c5844366e5dca031;hpb=6d3f798cba8075e700003aaf34f1e72bb930086c;p=openssl.git diff --git a/apps/dgst.c b/apps/dgst.c index 15f9e2e685..7ac1013303 100644 --- a/apps/dgst.c +++ b/apps/dgst.c @@ -330,6 +330,8 @@ int dgst_main(int argc, char **argv) } if (hmac_key != NULL) { + if (md == NULL) + md = (EVP_MD *)EVP_sha256(); sigkey = EVP_PKEY_new_raw_private_key(EVP_PKEY_HMAC, impl, (unsigned char *)hmac_key, strlen(hmac_key));