diff options
author | Richard Levitte <levitte@openssl.org> | 2015-11-30 23:43:27 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2015-12-07 17:39:23 +0100 |
commit | eda34e4bef33a3b8f1e207bf04769007c70cbd1e (patch) | |
tree | 25124fceef881c491a3c175eadd02e021da49ac7 /crypto | |
parent | 32fd54a9a36c172cf4e5fe4b7af2ae1f1ce1bc0a (diff) |
Adapt the rest of the source to the removal of (EVP_MD_CTX|HMAC_CTX)_cleanup
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/cms/cms_sd.c | 6 | ||||
-rw-r--r-- | crypto/evp/p5_crpt2.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/crypto/cms/cms_sd.c b/crypto/cms/cms_sd.c index 46a7876d94..1570fb6fe5 100644 --- a/crypto/cms/cms_sd.c +++ b/crypto/cms/cms_sd.c @@ -728,7 +728,7 @@ int CMS_SignerInfo_sign(CMS_SignerInfo *si) goto err; } - EVP_MD_CTX_cleanup(mctx); + EVP_MD_CTX_init(mctx); ASN1_STRING_set0(si->signature, abuf, siglen); @@ -736,7 +736,7 @@ int CMS_SignerInfo_sign(CMS_SignerInfo *si) err: OPENSSL_free(abuf); - EVP_MD_CTX_cleanup(mctx); + EVP_MD_CTX_init(mctx); return 0; } @@ -780,7 +780,7 @@ int CMS_SignerInfo_verify(CMS_SignerInfo *si) if (r <= 0) CMSerr(CMS_F_CMS_SIGNERINFO_VERIFY, CMS_R_VERIFICATION_FAILURE); err: - EVP_MD_CTX_cleanup(mctx); + EVP_MD_CTX_init(mctx); return r; } diff --git a/crypto/evp/p5_crpt2.c b/crypto/evp/p5_crpt2.c index b84e99ede3..9df07d67d0 100644 --- a/crypto/evp/p5_crpt2.c +++ b/crypto/evp/p5_crpt2.c @@ -134,7 +134,7 @@ int PKCS5_PBKDF2_HMAC(const char *pass, int passlen, HMAC_CTX_free(hctx_tpl); return 0; } - HMAC_CTX_cleanup(hctx); + HMAC_CTX_init(hctx); memcpy(p, digtmp, cplen); for (j = 1; j < iter; j++) { if (!HMAC_CTX_copy(hctx, hctx_tpl)) { @@ -148,7 +148,7 @@ int PKCS5_PBKDF2_HMAC(const char *pass, int passlen, HMAC_CTX_free(hctx_tpl); return 0; } - HMAC_CTX_cleanup(hctx); + HMAC_CTX_init(hctx); for (k = 0; k < cplen; k++) p[k] ^= digtmp[k]; } |