diff --git a/apps/dgst.c b/apps/dgst.c index 0bbde71d4b6713efdd45946bf24a673a069ba8fd..7fc7da1e53abf18f5d9534adabafa7be902cf553 100644 --- a/apps/dgst.c +++ b/apps/dgst.c @@ -319,7 +319,8 @@ int dgst_main(int argc, char **argv) if (hmac_key != NULL) { sigkey = EVP_PKEY_new_raw_private_key(EVP_PKEY_HMAC, impl, - (unsigned char *)hmac_key, -1); + (unsigned char *)hmac_key, + strlen(hmac_key)); if (sigkey == NULL) goto end; }