diff options
Diffstat (limited to 'crypto/evp')
-rw-r--r-- | crypto/evp/pmeth_lib.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/evp/pmeth_lib.c b/crypto/evp/pmeth_lib.c index 4ea36b7add..e7845ed43b 100644 --- a/crypto/evp/pmeth_lib.c +++ b/crypto/evp/pmeth_lib.c @@ -367,6 +367,7 @@ int EVP_PKEY_CTX_hex2ctrl(EVP_PKEY_CTX *ctx, int cmd, const char *hex) int EVP_PKEY_CTX_md(EVP_PKEY_CTX *ctx, int optype, int cmd, const char *md) { const EVP_MD *m; + if (md == NULL || (m = EVP_get_digestbyname(md)) == NULL) { EVPerr(EVP_F_EVP_PKEY_CTX_MD, EVP_R_INVALID_DIGEST); return 0; |