resolve the Valgrind issue with random numbers. Undo the changes to
RAND_bytes() and RAND_pseudo_bytes() that are redundant in this
respect.
Update documentation and FAQ accordingly, as the PURIFY macro is
available at least since 0.9.7.
OpenSSL library has been compiled with the PURIFY macro defined (-DPURIFY)
to get rid of these warnings
-The use of PURIFY with the PRNG was added in OpenSSL 0.9.8f.
-
===============================================================================
int RAND_bytes(unsigned char *buf, int num)
{
const RAND_METHOD *meth = RAND_get_rand_method();
-#ifdef PURIFY
- memset(buf, 0, num);
-#endif
if (meth && meth->bytes)
return meth->bytes(buf,num);
return(-1);
int RAND_pseudo_bytes(unsigned char *buf, int num)
{
const RAND_METHOD *meth = RAND_get_rand_method();
-#ifdef PURIFY
- memset(buf, 0, num);
-#endif
if (meth && meth->pseudorand)
return meth->pseudorand(buf,num);
return(-1);
generation etc.
The contents of B<buf> is mixed into the entropy pool before retrieving
-the new pseudo-random bytes unless disabled at compile time.
+the new pseudo-random bytes unless disabled at compile time (see FAQ).
=head1 RETURN VALUES