RAND_bytes/RAND_pseudo_bytes returns -1 if it is not supported by RAND method
This commit is contained in:
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,
|
||||
|
||||
Reference in New Issue
Block a user