Fixed IKEv1 prf+ keymat expansion beyond 320 bits
This commit is contained in:
@@ -72,12 +72,12 @@ METHOD(prf_plus_t, get_bytes, void,
|
|||||||
this->prf->get_bytes(this->prf, this->seed, NULL);
|
this->prf->get_bytes(this->prf, this->seed, NULL);
|
||||||
this->prf->get_bytes(this->prf, chunk_from_thing(this->counter),
|
this->prf->get_bytes(this->prf, chunk_from_thing(this->counter),
|
||||||
this->buffer.ptr);
|
this->buffer.ptr);
|
||||||
|
this->counter++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->prf->get_bytes(this->prf, this->seed, this->buffer.ptr);
|
this->prf->get_bytes(this->prf, this->seed, this->buffer.ptr);
|
||||||
}
|
}
|
||||||
this->counter++;
|
|
||||||
this->used = 0;
|
this->used = 0;
|
||||||
}
|
}
|
||||||
round = min(length, this->buffer.len - this->used);
|
round = min(length, this->buffer.len - this->used);
|
||||||
|
|||||||
Reference in New Issue
Block a user