projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
HMAC doesn't work with a default digest
[openssl.git]
/
apps
/
dgst.c
diff --git
a/apps/dgst.c
b/apps/dgst.c
index 15f9e2e6850dcb2be751f5f7c5844366e5dca031..7ac101330351c881ccb400e2e815f313f95717b7 100644
(file)
--- 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));