ossl_seed: avoid recursive seeding!
This commit is contained in:
parent
296b9a5af0
commit
1a4dd1aa7c
@ -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"
|
/* If we get here, it means we need to seed the PRNG using a "silly"
|
||||||
approach! */
|
approach! */
|
||||||
do {
|
do {
|
||||||
int len;
|
|
||||||
unsigned char randb[64];
|
unsigned char randb[64];
|
||||||
Curl_ossl_random(data, randb, sizeof(randb));
|
int len = sizeof(randb);
|
||||||
|
RAND_bytes(randb, len);
|
||||||
len = sizeof(randb);
|
|
||||||
RAND_add(randb, len, (len >> 1));
|
RAND_add(randb, len, (len >> 1));
|
||||||
} while(!RAND_status());
|
} while(!RAND_status());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user