summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rand/md_rand.c
diff options
context:
space:
mode:
authordjm <>2009-01-09 12:14:09 +0000
committerdjm <>2009-01-09 12:14:09 +0000
commit76dd4d55fdccad54d20608e7caf577b9d67b216f (patch)
tree9b645adc5cf0aa0820e1501ee5c6f2c41c454e7c /src/lib/libcrypto/rand/md_rand.c
parentf1625f274acf5dcd5601f6cb5e29e233b2a441a3 (diff)
downloadopenbsd-76dd4d55fdccad54d20608e7caf577b9d67b216f.tar.gz
openbsd-76dd4d55fdccad54d20608e7caf577b9d67b216f.tar.bz2
openbsd-76dd4d55fdccad54d20608e7caf577b9d67b216f.zip
import openssl-0.9.8j
Diffstat (limited to 'src/lib/libcrypto/rand/md_rand.c')
-rw-r--r--src/lib/libcrypto/rand/md_rand.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/libcrypto/rand/md_rand.c b/src/lib/libcrypto/rand/md_rand.c
index 9783d0c23e..0f8dd3e00f 100644
--- a/src/lib/libcrypto/rand/md_rand.c
+++ b/src/lib/libcrypto/rand/md_rand.c
@@ -126,6 +126,10 @@
126 126
127#include <openssl/crypto.h> 127#include <openssl/crypto.h>
128#include <openssl/err.h> 128#include <openssl/err.h>
129#ifdef OPENSSL_FIPS
130#include <openssl/fips.h>
131#endif
132
129 133
130#ifdef BN_DEBUG 134#ifdef BN_DEBUG
131# define PREDICT 135# define PREDICT
@@ -332,6 +336,14 @@ static int ssleay_rand_bytes(unsigned char *buf, int num)
332#endif 336#endif
333 int do_stir_pool = 0; 337 int do_stir_pool = 0;
334 338
339#ifdef OPENSSL_FIPS
340 if(FIPS_mode())
341 {
342 FIPSerr(FIPS_F_SSLEAY_RAND_BYTES,FIPS_R_NON_FIPS_METHOD);
343 return 0;
344 }
345#endif
346
335#ifdef PREDICT 347#ifdef PREDICT
336 if (rand_predictable) 348 if (rand_predictable)
337 { 349 {