summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/crypto/evp/p_sign.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/crypto/evp/p_sign.c')
-rw-r--r--crypto/openssl/crypto/evp/p_sign.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/crypto/openssl/crypto/evp/p_sign.c b/crypto/openssl/crypto/evp/p_sign.c
index 1fa32ac..e4ae590 100644
--- a/crypto/openssl/crypto/evp/p_sign.c
+++ b/crypto/openssl/crypto/evp/p_sign.c
@@ -65,7 +65,7 @@
#ifdef undef
void EVP_SignInit(EVP_MD_CTX *ctx, EVP_MD *type)
{
- EVP_DigestInit(ctx,type);
+ EVP_DigestInit_ex(ctx,type);
}
void EVP_SignUpdate(EVP_MD_CTX *ctx, unsigned char *data,
@@ -84,8 +84,10 @@ int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen,
MS_STATIC EVP_MD_CTX tmp_ctx;
*siglen=0;
- EVP_MD_CTX_copy(&tmp_ctx,ctx);
- EVP_DigestFinal(&tmp_ctx,&(m[0]),&m_len);
+ EVP_MD_CTX_init(&tmp_ctx);
+ EVP_MD_CTX_copy_ex(&tmp_ctx,ctx);
+ EVP_DigestFinal_ex(&tmp_ctx,&(m[0]),&m_len);
+ EVP_MD_CTX_cleanup(&tmp_ctx);
for (i=0; i<4; i++)
{
v=ctx->digest->required_pkey_type[i];
OpenPOWER on IntegriCloud