aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2013-02-22 22:54:31 +0100
committerDaniel Stenberg <daniel@haxx.se>2013-02-22 23:04:49 +0100
commit1a4dd1aa7c1bf9241453434c256aae49d97427d2 (patch)
tree145c2b66117e2dfe6ba72f838898b88ed72dfb7c
parent296b9a5af0c0de3f5b3d78a85a6ace8cdc9647f1 (diff)
ossl_seed: avoid recursive seeding!
-rw-r--r--lib/ssluse.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/ssluse.c b/lib/ssluse.c
index 79a61e49d..a6709d933 100644
--- a/lib/ssluse.c
+++ b/lib/ssluse.c
@@ -237,11 +237,9 @@ static int ossl_seed(struct SessionHandle *data)
/* If we get here, it means we need to seed the PRNG using a "silly"
approach! */
do {
- int len;
unsigned char randb[64];
- Curl_ossl_random(data, randb, sizeof(randb));
-
- len = sizeof(randb);
+ int len = sizeof(randb);
+ RAND_bytes(randb, len);
RAND_add(randb, len, (len >> 1));
} while(!RAND_status());