summaryrefslogtreecommitdiffstats
path: root/crypto/evp/p_sign.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/evp/p_sign.c')
-rw-r--r--crypto/evp/p_sign.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/evp/p_sign.c b/crypto/evp/p_sign.c
index 4eb34db267..ae0de57202 100644
--- a/crypto/evp/p_sign.c
+++ b/crypto/evp/p_sign.c
@@ -39,6 +39,8 @@ int EVP_SignFinal_ex(EVP_MD_CTX *ctx, unsigned char *sigret,
rv = EVP_MD_CTX_copy_ex(tmp_ctx, ctx);
if (rv)
rv = EVP_DigestFinal_ex(tmp_ctx, m, &m_len);
+ else
+ rv = EVP_DigestFinal_ex(ctx, m, &m_len);
EVP_MD_CTX_free(tmp_ctx);
if (!rv)
return 0;