From: Daniel Stenberg Date: Fri, 22 Feb 2013 21:54:31 +0000 (+0100) Subject: ossl_seed: avoid recursive seeding! X-Git-Tag: curl-7_30_0~313 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a4dd1aa7c1bf9241453434c256aae49d97427d2;p=thirdparty%2Fcurl.git ossl_seed: avoid recursive seeding! --- 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());