Permalink
Browse files

ossl_seed: avoid recursive seeding!

  • Loading branch information...
1 parent 296b9a5 commit 1a4dd1aa7c1bf9241453434c256aae49d97427d2 @bagder bagder committed Feb 22, 2013
Showing with 2 additions and 4 deletions.
  1. +2 −4 lib/ssluse.c
View
@@ -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());

0 comments on commit 1a4dd1a

Please sign in to comment.