Re: when does RAND_pseudo_bytes() return 0?

2010-02-17 Thread Thomas Anderson
ssleay_rand_pseudo_bytes(): /* pseudo-random bytes that are guaranteed to be unique but not unpredictable */ static int ssleay_rand_pseudo_bytes(unsigned char *buf, int num) { int ret; unsigned long err; ret = RAND_bytes(buf, num); if (ret == 0)

Re: when does RAND_pseudo_bytes() return 0?

2010-02-17 Thread Mounir IDRASSI
Hi, If you are not using an engine, then pseudorand is implemented in md_rand.c : function ssleay_rand_pseudo_bytes (line 524). Cheers, -- Mounir IDRASSI IDRIX http://www.idrix.fr On 2/17/2010 8:10 PM, Thomas Anderson wrote: According to,

when does RAND_pseudo_bytes() return 0?

2010-02-17 Thread Thomas Anderson
According to , "RAND_bytes() returns 1 on success, 0 otherwise. The error code can be obtained by ERR_get_error(3). RAND_pseudo_bytes() returns 1 if the bytes generated are cryptographically strong, 0 otherwise. Both functions return -1 if they ar