diff options
author | Ben Laurie <ben@openssl.org> | 2007-09-20 12:33:24 +0000 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 2007-09-20 12:33:24 +0000 |
commit | 48ca0c99b2bf78c756fe96d1ac71b66cd0b1a38a (patch) | |
tree | 833177e92b676ec44921128645274d3a49ff17b5 | |
parent | 015052cf7b353ee6a7be0318f48d871979dac902 (diff) | |
download | openssl-new-48ca0c99b2bf78c756fe96d1ac71b66cd0b1a38a.tar.gz |
Use PURIFY instead of PEDANTIC.
-rw-r--r-- | FAQ | 6 | ||||
-rw-r--r-- | crypto/rand/rand_lib.c | 4 |
2 files changed, 5 insertions, 5 deletions
@@ -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 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 -OpenSSL library has been compiled with the PEDANTIC macro defined (-DPEDANTIC) -to get rid of these warnings. Compling with -DPURIFY will help as well. +OpenSSL library has been compiled with the PURIFY macro defined (-DPURIFY) +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. =============================================================================== diff --git a/crypto/rand/rand_lib.c b/crypto/rand/rand_lib.c index b615696e97..f0ddc1ee45 100644 --- a/crypto/rand/rand_lib.c +++ b/crypto/rand/rand_lib.c @@ -154,7 +154,7 @@ void RAND_add(const void *buf, int num, double entropy) int RAND_bytes(unsigned char *buf, int num) { const RAND_METHOD *meth = RAND_get_rand_method(); -#ifdef PEDANTIC +#ifdef PURIFY memset(buf, 0, num); #endif 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) { const RAND_METHOD *meth = RAND_get_rand_method(); -#ifdef PEDANTIC +#ifdef PURIFY memset(buf, 0, num); #endif if (meth && meth->pseudorand) |