Fixed RNG crypto tester
This commit is contained in:
parent
3973ffa4f6
commit
91a8dc2dec
|
@ -1075,17 +1075,15 @@ METHOD(crypto_tester_t, test_rng, bool,
|
||||||
{
|
{
|
||||||
goto failure;
|
goto failure;
|
||||||
}
|
}
|
||||||
if (!failed)
|
/* write bytes into existing buffer */
|
||||||
{ /* write bytes into existing buffer */
|
memset(data.ptr, 0, data.len);
|
||||||
memset(data.ptr, 0, data.len);
|
if (!rng->get_bytes(rng, vector->len, data.ptr))
|
||||||
if (!rng->get_bytes(rng, vector->len, data.ptr))
|
{
|
||||||
{
|
goto failure;
|
||||||
goto failure;
|
}
|
||||||
}
|
if (!vector->test(vector->user, data))
|
||||||
if (!vector->test(vector->user, data))
|
{
|
||||||
{
|
goto failure;
|
||||||
goto failure;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
failed = FALSE;
|
failed = FALSE;
|
||||||
|
|
Loading…
Reference in New Issue