RAND_bytes/RAND_pseudo_bytes returns -1 if it is not supported by RAND method

This commit is contained in:
Martin Willi
2013-04-10 18:10:30 +02:00
committed by Andreas Steffen
parent 0faaab20cd
commit 96a09ce226
@@ -57,7 +57,7 @@ METHOD(rng_t, get_bytes, bool,
{
ret = RAND_pseudo_bytes((char*)buffer, bytes);
}
return ret != 0;
return ret == 1;
}
METHOD(rng_t, allocate_bytes, bool,