Commit 1a4dd1aa authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

ossl_seed: avoid recursive seeding!

parent 296b9a5a
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -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());