aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2010-12-23 14:36:07 +0100
committerDaniel Stenberg <daniel@haxx.se>2010-12-23 14:36:07 +0100
commit2dded8fedba49b7542a07c78624890dcf9e9dca7 (patch)
treed5e89f2ddba3237fff2d30a663d362d5f89b0986
parentbe16b227b7e2d24b49983f50379f9e93827fd48e (diff)
ossl_seed: no more RAND_screen
RAND_screen() is slow, not thread-safe and not needed anymore since OpenSSL uses the thread-safe win32 CryptoAPI nowadays.
-rw-r--r--lib/ssluse.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/ssluse.c b/lib/ssluse.c
index d8f776018..9e3fca392 100644
--- a/lib/ssluse.c
+++ b/lib/ssluse.c
@@ -225,7 +225,8 @@ static int ossl_seed(struct SessionHandle *data)
/* If we get here, it means we need to seed the PRNG using a "silly"
approach! */
#ifdef HAVE_RAND_SCREEN
- /* if RAND_screen() is present, it was called during global init */
+ /* if RAND_screen() is present, this is windows and thus we assume that the
+ randomness is already taken care of */
nread = 100; /* just a value */
#else
{
@@ -685,13 +686,6 @@ int Curl_ossl_init(void)
OpenSSL_add_all_algorithms();
-#ifdef HAVE_RAND_SCREEN
- /* This one gets a random value by reading the currently shown screen.
- RAND_screen() is not thread-safe according to OpenSSL devs - although not
- mentioned in documentation. */
- RAND_screen();
-#endif
-
return 1;
}