summaryrefslogtreecommitdiffstats
path: root/crypto/evp/p_verify.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/evp/p_verify.c')
-rw-r--r--crypto/evp/p_verify.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/evp/p_verify.c b/crypto/evp/p_verify.c
index 8db46412f3..6e2e70b382 100644
--- a/crypto/evp/p_verify.c
+++ b/crypto/evp/p_verify.c
@@ -71,8 +71,10 @@ int EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf,
MS_STATIC EVP_MD_CTX tmp_ctx;
EVP_MD_CTX_init(&tmp_ctx);
- EVP_MD_CTX_copy_ex(&tmp_ctx,ctx);
- EVP_DigestFinal_ex(&tmp_ctx,&(m[0]),&m_len);
+ if (!EVP_MD_CTX_copy_ex(&tmp_ctx,ctx))
+ goto err;
+ if (!EVP_DigestFinal_ex(&tmp_ctx,&(m[0]),&m_len))
+ goto err;
EVP_MD_CTX_cleanup(&tmp_ctx);
if (ctx->digest->flags & EVP_MD_FLAG_PKEY_METHOD_SIGNATURE)