Adapt the rest of the source to the removal of (EVP_MD_CTX|HMAC_CTX)_cleanup

Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
Richard Levitte
2015-11-30 23:43:27 +01:00
parent 32fd54a9a3
commit eda34e4bef
6 changed files with 8 additions and 10 deletions

View File

@@ -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;
}

View File

@@ -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];
}