Skip to content

Commit

Permalink
check whether 2/3 prf impls are unused
Browse files Browse the repository at this point in the history
  • Loading branch information
lrstewart committed Feb 26, 2025
1 parent 6e25db8 commit c1f7183
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions tls/s2n_prf.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,7 @@ static int s2n_evp_pkey_p_hash_update(struct s2n_prf_working_space *ws, const vo

static int s2n_evp_pkey_p_hash_final(struct s2n_prf_working_space *ws, void *digest, uint32_t size)
{
/* EVP_DigestSign API's require size_t data structures */
size_t digest_size = size;

POSIX_GUARD_OSSL(EVP_DigestSignFinal(ws->p_hash.evp_hmac.evp_digest.ctx, (unsigned char *) digest, &digest_size), S2N_ERR_P_HASH_FINAL_FAILED);

return 0;
POSIX_BAIL(S2N_ERR_TEST_ASSERTION);
}

static int s2n_evp_pkey_p_hash_wipe(struct s2n_prf_working_space *ws)
Expand Down Expand Up @@ -296,10 +291,7 @@ static int s2n_evp_hmac_p_hash_update(struct s2n_prf_working_space *ws, const vo

static int s2n_evp_hmac_p_hash_final(struct s2n_prf_working_space *ws, void *digest, uint32_t size)
{
/* HMAC_Final API's require size_t data structures */
unsigned int digest_size = size;
POSIX_GUARD_OSSL(HMAC_Final(ws->p_hash.evp_hmac.ctx.hmac_ctx, (unsigned char *) digest, &digest_size), S2N_ERR_P_HASH_FINAL_FAILED);
return S2N_SUCCESS;
POSIX_BAIL(S2N_ERR_TEST_ASSERTION);
}

static int s2n_evp_hmac_p_hash_reset(struct s2n_prf_working_space *ws)
Expand Down

0 comments on commit c1f7183

Please sign in to comment.