ERR_peek_error() returns "unsigned long".
This commit is contained in:
parent
44e48abc44
commit
47b0f48dd9
@ -493,11 +493,12 @@ static int ssleay_rand_bytes(unsigned char *buf, int num)
|
|||||||
static int ssleay_rand_pseudo_bytes(unsigned char *buf, int num)
|
static int ssleay_rand_pseudo_bytes(unsigned char *buf, int num)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
unsigned long err;
|
||||||
|
|
||||||
ret = RAND_bytes(buf, num);
|
ret = RAND_bytes(buf, num);
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
{
|
{
|
||||||
long err = ERR_peek_error();
|
err = ERR_peek_error();
|
||||||
if (ERR_GET_LIB(err) == ERR_LIB_RAND &&
|
if (ERR_GET_LIB(err) == ERR_LIB_RAND &&
|
||||||
ERR_GET_REASON(err) == RAND_R_PRNG_NOT_SEEDED)
|
ERR_GET_REASON(err) == RAND_R_PRNG_NOT_SEEDED)
|
||||||
(void)ERR_get_error();
|
(void)ERR_get_error();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user