goto err;
}
- EVP_MD_CTX_cleanup(mctx);
+ EVP_MD_CTX_init(mctx);
ASN1_STRING_set0(si->signature, abuf, siglen);
err:
OPENSSL_free(abuf);
- EVP_MD_CTX_cleanup(mctx);
+ EVP_MD_CTX_init(mctx);
return 0;
}
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;
}
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)) {
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];
}
|| EVP_DigestUpdate(md_ctx, ssl3_pad_2, npad) <= 0
|| EVP_DigestUpdate(md_ctx, md, md_size) <= 0
|| EVP_DigestFinal_ex(md_ctx, md, &md_size_u) <= 0) {
- EVP_MD_CTX_cleanup(md_ctx);
+ EVP_MD_CTX_init(md_ctx);
return -1;
}
md_size = md_size_u;
ret = EVP_MD_CTX_size(ctx);
if (ret < 0) {
- EVP_MD_CTX_cleanup(ctx);
+ EVP_MD_CTX_init(ctx);
return 0;
}
}
printf("test 4 ok\n");
test5:
- HMAC_CTX_cleanup(ctx);
HMAC_CTX_init(ctx);
if (HMAC_Init_ex(ctx, test[4].key, test[4].key_len, NULL, NULL)) {
printf("Should fail to initialise HMAC with empty MD (test 5)\n");
printf("test 5 ok\n");
}
test6:
- HMAC_CTX_cleanup(ctx);
HMAC_CTX_init(ctx);
ctx2 = HMAC_CTX_new();
if (ctx2 == NULL) {
"aaaaaaaa" "aaaaaaaa" "aaaaaaaa" "aaaaaaaa",
(1000000 - i) < 288 ? 1000000 - i : 288);
EVP_DigestFinal_ex(evp, md, NULL);
- EVP_MD_CTX_cleanup(evp);
+ EVP_MD_CTX_init(evp);
if (memcmp(md, app_c3, sizeof(app_c3))) {
fflush(stdout);