Since ssleay_rand_initialize() unlocks then locks CRYPTO_LOCK_RAND,
it's a good thing if ssleay_rand_status() would do the corresponding lock and unlock as everyone else...
This commit is contained in:
parent
8311d32378
commit
7ae634de49
@ -559,8 +559,13 @@ static int ssleay_rand_pseudo_bytes(unsigned char *buf, int num)
|
|||||||
|
|
||||||
static int ssleay_rand_status(void)
|
static int ssleay_rand_status(void)
|
||||||
{
|
{
|
||||||
|
CRYPTO_w_lock(CRYPTO_LOCK_RAND);
|
||||||
|
|
||||||
if (!initialized)
|
if (!initialized)
|
||||||
ssleay_rand_initialize();
|
ssleay_rand_initialize();
|
||||||
|
|
||||||
|
CRYPTO_w_unlock(CRYPTO_LOCK_RAND);
|
||||||
|
|
||||||
return (entropy >= ENTROPY_NEEDED);
|
return (entropy >= ENTROPY_NEEDED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user