diff options
author | Dmitry Belyavskiy <beldmit@gmail.com> | 2021-05-20 10:59:07 +0200 |
---|---|---|
committer | Dmitry Belyavskiy <beldmit@gmail.com> | 2021-05-21 13:07:28 +0200 |
commit | 819b94c0c0d338fbec0aee828f3b61d7878c3837 (patch) | |
tree | 037aa94173aa5e90e853f1fd31ce4738422dd33f /apps/dgst.c | |
parent | Properly restore XMM registers in ChaCha20's AVX-512(VL) assembly (diff) | |
download | openssl-819b94c0c0d338fbec0aee828f3b61d7878c3837.tar.xz openssl-819b94c0c0d338fbec0aee828f3b61d7878c3837.zip |
HMAC doesn't work with a default digest
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15371)
Diffstat (limited to 'apps/dgst.c')
-rw-r--r-- | apps/dgst.c | 2 |
1 files changed, 2 insertions, 0 deletions
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)); |