Fixed IKEv1 prf+ keymat expansion beyond 320 bits

This commit is contained in:
Martin Willi
2012-03-20 17:31:22 +01:00
parent 3ba15819ed
commit 7b1e15ac4e
+1 -1
View File
@@ -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, chunk_from_thing(this->counter),
this->buffer.ptr);
this->counter++;
}
else
{
this->prf->get_bytes(this->prf, this->seed, this->buffer.ptr);
}
this->counter++;
this->used = 0;
}
round = min(length, this->buffer.len - this->used);