static void pkey_tls1_prf_cleanup(EVP_PKEY_CTX *ctx)
{
TLS1_PRF_PKEY_CTX *kctx = ctx->data;
- OPENSSL_clear_free(kctx->sec, kctx->seclen);
+ freezero(kctx->sec, kctx->seclen);
OPENSSL_cleanse(kctx->seed, kctx->seedlen);
OPENSSL_free(kctx);
}
if (p1 < 0)
return 0;
if (kctx->sec != NULL)
- OPENSSL_clear_free(kctx->sec, kctx->seclen);
+ freezero(kctx->sec, kctx->seclen);
OPENSSL_cleanse(kctx->seed, kctx->seedlen);
kctx->seedlen = 0;
kctx->sec = OPENSSL_memdup(p2, p1);
}
if (!tls1_prf_P_hash(EVP_sha1(), sec + slen/2, slen/2 + (slen & 1),
seed, seed_len, tmp, olen)) {
- OPENSSL_clear_free(tmp, olen);
+ freezero(tmp, olen);
return 0;
}
for (i = 0; i < olen; i++)
out[i] ^= tmp[i];
- OPENSSL_clear_free(tmp, olen);
+ freezero(tmp, olen);
return 1;
}
if (!tls1_prf_P_hash(md, sec, slen, seed, seed_len, out, olen))