ossl_seed: avoid recursive seeding!
authorDaniel Stenberg <daniel@haxx.se>
Fri, 22 Feb 2013 21:54:31 +0000 (22:54 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 22 Feb 2013 22:04:49 +0000 (23:04 +0100)
lib/ssluse.c

index 79a61e4..a6709d9 100644 (file)
@@ -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());