Use PURIFY instead of PEDANTIC.
This commit is contained in:
parent
015052cf7b
commit
48ca0c99b2
6
FAQ
6
FAQ
@ -901,10 +901,10 @@ When OpenSSL's PRNG routines are called to generate random numbers the supplied
|
|||||||
buffer contents are mixed into the entropy pool: so it technically does not
|
buffer contents are mixed into the entropy pool: so it technically does not
|
||||||
matter whether the buffer is initialized at this point or not. Valgrind (and
|
matter whether the buffer is initialized at this point or not. Valgrind (and
|
||||||
other test tools) will complain about this. When using Valgrind, make sure the
|
other test tools) will complain about this. When using Valgrind, make sure the
|
||||||
OpenSSL library has been compiled with the PEDANTIC macro defined (-DPEDANTIC)
|
OpenSSL library has been compiled with the PURIFY macro defined (-DPURIFY)
|
||||||
to get rid of these warnings. Compling with -DPURIFY will help as well.
|
to get rid of these warnings
|
||||||
|
|
||||||
The use of PEDANTIC with the PRNG was added in OpenSSL 0.9.8f.
|
The use of PURIFY with the PRNG was added in OpenSSL 0.9.8f.
|
||||||
|
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
|
@ -154,7 +154,7 @@ void RAND_add(const void *buf, int num, double entropy)
|
|||||||
int RAND_bytes(unsigned char *buf, int num)
|
int RAND_bytes(unsigned char *buf, int num)
|
||||||
{
|
{
|
||||||
const RAND_METHOD *meth = RAND_get_rand_method();
|
const RAND_METHOD *meth = RAND_get_rand_method();
|
||||||
#ifdef PEDANTIC
|
#ifdef PURIFY
|
||||||
memset(buf, 0, num);
|
memset(buf, 0, num);
|
||||||
#endif
|
#endif
|
||||||
if (meth && meth->bytes)
|
if (meth && meth->bytes)
|
||||||
@ -165,7 +165,7 @@ int RAND_bytes(unsigned char *buf, int num)
|
|||||||
int RAND_pseudo_bytes(unsigned char *buf, int num)
|
int RAND_pseudo_bytes(unsigned char *buf, int num)
|
||||||
{
|
{
|
||||||
const RAND_METHOD *meth = RAND_get_rand_method();
|
const RAND_METHOD *meth = RAND_get_rand_method();
|
||||||
#ifdef PEDANTIC
|
#ifdef PURIFY
|
||||||
memset(buf, 0, num);
|
memset(buf, 0, num);
|
||||||
#endif
|
#endif
|
||||||
if (meth && meth->pseudorand)
|
if (meth && meth->pseudorand)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user