Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ossl_seed: avoid recursive seeding!

  • Loading branch information...
commit 1a4dd1aa7c1bf9241453434c256aae49d97427d2 1 parent 296b9a5
Daniel Stenberg authored
Showing with 2 additions and 4 deletions.
  1. +2 −4 lib/ssluse.c
6 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());
Please sign in to comment.
Something went wrong with that request. Please try again.