From: tedu Date: Fri, 18 Apr 2014 18:01:06 +0000 (+0000) Subject: another "string to make the random number generator think it has entropy" X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5c2295c37b9d6bd331e520adcca048e69df7fa45;p=openbsd another "string to make the random number generator think it has entropy" --- diff --git a/lib/libssl/src/apps/speed.c b/lib/libssl/src/apps/speed.c index 9ff417c9935..f1bf2261365 100644 --- a/lib/libssl/src/apps/speed.c +++ b/lib/libssl/src/apps/speed.c @@ -246,11 +246,6 @@ static double ecdsa_results[EC_NUM][2]; static double ecdh_results[EC_NUM][1]; #endif -#if defined(OPENSSL_NO_DSA) && !(defined(OPENSSL_NO_ECDSA) && defined(OPENSSL_NO_ECDH)) -static const char rnd_seed[] = "string to make the random number generator think it has entropy"; -static int rnd_fake = 0; -#endif - #ifdef SIGALRM #if defined(__STDC__) || defined(sgi) || defined(_AIX) #define SIGRETTYPE void @@ -1958,10 +1953,6 @@ speed_main(int argc, char **argv) RAND_pseudo_bytes(buf, 20); #ifndef OPENSSL_NO_DSA - if (RAND_status() != 1) { - RAND_seed(rnd_seed, sizeof rnd_seed); - rnd_fake = 1; - } for (j = 0; j < DSA_NUM; j++) { unsigned int kk; int ret; @@ -2035,15 +2026,9 @@ speed_main(int argc, char **argv) dsa_doit[j] = 0; } } - if (rnd_fake) - RAND_cleanup(); #endif #ifndef OPENSSL_NO_ECDSA - if (RAND_status() != 1) { - RAND_seed(rnd_seed, sizeof rnd_seed); - rnd_fake = 1; - } for (j = 0; j < EC_NUM; j++) { int ret; @@ -2130,15 +2115,9 @@ speed_main(int argc, char **argv) } } } - if (rnd_fake) - RAND_cleanup(); #endif #ifndef OPENSSL_NO_ECDH - if (RAND_status() != 1) { - RAND_seed(rnd_seed, sizeof rnd_seed); - rnd_fake = 1; - } for (j = 0; j < EC_NUM; j++) { if (!ecdh_doit[j]) continue; @@ -2221,8 +2200,6 @@ speed_main(int argc, char **argv) ecdh_doit[j] = 0; } } - if (rnd_fake) - RAND_cleanup(); #endif #ifndef NO_FORK show_res: