aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/evp/digest.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2006-05-25 00:55:00 +0000
committerDr. Stephen Henson <steve@openssl.org>2006-05-25 00:55:00 +0000
commit3a828611e937d68229fd0308f0459f6bd249c830 (patch)
treea918cbbe8e8ff490cdaecca2b7ad29c3938c0df1 /crypto/evp/digest.c
parent8bdcef40e48f167e0d566fc5a831c05a7d94d7b1 (diff)
downloadopenssl-3a828611e937d68229fd0308f0459f6bd249c830.tar.gz
Update EVP_MD_CTX_copy_ex() to use EVP_PKEY_CTX_dup().
Diffstat (limited to 'crypto/evp/digest.c')
-rw-r--r--crypto/evp/digest.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/crypto/evp/digest.c b/crypto/evp/digest.c
index 762e6d3450..11d73388d4 100644
--- a/crypto/evp/digest.c
+++ b/crypto/evp/digest.c
@@ -279,6 +279,16 @@ int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in)
memcpy(out->md_data,in->md_data,out->digest->ctx_size);
}
+ if (in->pctx)
+ {
+ out->pctx = EVP_PKEY_CTX_dup(in->pctx);
+ if (!out->pctx)
+ {
+ EVP_MD_CTX_cleanup(out);
+ return 0;
+ }
+ }
+
if (out->digest->copy)
return out->digest->copy(out,in);