diff options
author | 2006-06-27 05:06:51 +0000 | |
---|---|---|
committer | 2006-06-27 05:06:51 +0000 | |
commit | 6d388760ec629bdebe2f200913a35899243a7957 (patch) | |
tree | ecc7cf9ca37d08421471848c6f746702ed91b8e8 /lib/libcrypto/rand/rand_lib.c | |
parent | import of openssl-0.9.7j (diff) | |
download | wireguard-openbsd-6d388760ec629bdebe2f200913a35899243a7957.tar.xz wireguard-openbsd-6d388760ec629bdebe2f200913a35899243a7957.zip |
resolve conflicts
Diffstat (limited to 'lib/libcrypto/rand/rand_lib.c')
-rw-r--r-- | lib/libcrypto/rand/rand_lib.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/lib/libcrypto/rand/rand_lib.c b/lib/libcrypto/rand/rand_lib.c index 88f1b56d91e..a21bde79de0 100644 --- a/lib/libcrypto/rand/rand_lib.c +++ b/lib/libcrypto/rand/rand_lib.c @@ -87,16 +87,6 @@ int RAND_set_rand_method(const RAND_METHOD *meth) const RAND_METHOD *RAND_get_rand_method(void) { -#ifdef OPENSSL_FIPS - if(FIPS_mode() - && default_RAND_meth != FIPS_rand_check()) - { - RANDerr(RAND_F_RAND_GET_RAND_METHOD,RAND_R_NON_FIPS_METHOD); - return 0; - } -#endif - - if (!default_RAND_meth) { #ifndef OPENSSL_NO_ENGINE @@ -114,8 +104,22 @@ const RAND_METHOD *RAND_get_rand_method(void) funct_ref = e; else #endif - default_RAND_meth = RAND_SSLeay(); +#ifdef OPENSSL_FIPS + if(FIPS_mode()) + default_RAND_meth=FIPS_rand_method(); + else +#endif + default_RAND_meth = RAND_SSLeay(); } + +#ifdef OPENSSL_FIPS + if(FIPS_mode() + && default_RAND_meth != FIPS_rand_check()) + { + RANDerr(RAND_F_RAND_GET_RAND_METHOD,RAND_R_NON_FIPS_METHOD); + return 0; + } +#endif return default_RAND_meth; } |