diff options
author | 2005-04-29 05:39:09 +0000 | |
---|---|---|
committer | 2005-04-29 05:39:09 +0000 | |
commit | 40d8aef356a70d0b13395f0805e3044b85d91347 (patch) | |
tree | 22edbfd34c49ce1b7988794a7a74d65829c13819 /lib/libssl/src/crypto/rand/md_rand.c | |
parent | import of openssl-0.9.7g; tested on platforms from alpha to zaurus, ok deraadt@ (diff) | |
download | wireguard-openbsd-40d8aef356a70d0b13395f0805e3044b85d91347.tar.xz wireguard-openbsd-40d8aef356a70d0b13395f0805e3044b85d91347.zip |
resolve conflicts
Diffstat (limited to 'lib/libssl/src/crypto/rand/md_rand.c')
-rw-r--r-- | lib/libssl/src/crypto/rand/md_rand.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/libssl/src/crypto/rand/md_rand.c b/lib/libssl/src/crypto/rand/md_rand.c index eeffc0df4cb..c84968df88f 100644 --- a/lib/libssl/src/crypto/rand/md_rand.c +++ b/lib/libssl/src/crypto/rand/md_rand.c @@ -126,6 +126,7 @@ #include <openssl/crypto.h> #include <openssl/err.h> +#include <openssl/fips.h> #ifdef BN_DEBUG # define PREDICT @@ -332,6 +333,14 @@ static int ssleay_rand_bytes(unsigned char *buf, int num) #endif int do_stir_pool = 0; +#ifdef OPENSSL_FIPS + if(FIPS_mode()) + { + FIPSerr(FIPS_F_SSLEAY_RAND_BYTES,FIPS_R_NON_FIPS_METHOD); + return 0; + } +#endif + #ifdef PREDICT if (rand_predictable) { |