From 1a4dd1aa7c1bf9241453434c256aae49d97427d2 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 22 Feb 2013 22:54:31 +0100 Subject: [PATCH] ossl_seed: avoid recursive seeding! --- lib/ssluse.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/ssluse.c b/lib/ssluse.c index 79a61e49d8..a6709d9330 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());