Fix tls_prf bug introduced with bc474883
This commit is contained in:
parent
964de0abde
commit
2df12b4c57
|
@ -55,11 +55,14 @@ static bool p_hash(prf_t *prf, char *label, chunk_t seed, size_t block_size,
|
||||||
|
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
{
|
{
|
||||||
|
/* A(i) = HMAC_hash(secret, A(i-1)) */
|
||||||
|
if (!prf->get_bytes(prf, a, abuf))
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
a = chunk_from_thing(abuf);
|
a = chunk_from_thing(abuf);
|
||||||
/* A(i) = HMAC_hash(secret, A(i-1))
|
/* HMAC_hash(secret, A(i) + seed) */
|
||||||
* HMAC_hash(secret, A(i) + seed) */
|
if (!prf->get_bytes(prf, a, NULL) ||
|
||||||
if (!prf->get_bytes(prf, a, abuf) ||
|
|
||||||
!prf->get_bytes(prf, a, NULL) ||
|
|
||||||
!prf->get_bytes(prf, seed, buf))
|
!prf->get_bytes(prf, seed, buf))
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in New Issue