projects
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8311d32
)
Since ssleay_rand_initialize() unlocks then locks CRYPTO_LOCK_RAND,
author
Richard Levitte
<levitte@openssl.org>
Wed, 29 Mar 2000 17:25:52 +0000
(17:25 +0000)
committer
Richard Levitte
<levitte@openssl.org>
Wed, 29 Mar 2000 17:25:52 +0000
(17:25 +0000)
it's a good thing if ssleay_rand_status() would do the corresponding
lock and unlock as everyone else...
crypto/rand/md_rand.c
patch
|
blob
|
history
diff --git
a/crypto/rand/md_rand.c
b/crypto/rand/md_rand.c
index b1d51e890b70ba2cb4586c537a11a195b7c2a9d7..79e3484b4dec1012957cb6691ff731a83e74b1e4 100644
(file)
--- a/
crypto/rand/md_rand.c
+++ b/
crypto/rand/md_rand.c
@@
-559,8
+559,13
@@
static int ssleay_rand_pseudo_bytes(unsigned char *buf, int num)
static int ssleay_rand_status(void)
{
+ CRYPTO_w_lock(CRYPTO_LOCK_RAND);
+
if (!initialized)
ssleay_rand_initialize();
+
+ CRYPTO_w_unlock(CRYPTO_LOCK_RAND);
+
return (entropy >= ENTROPY_NEEDED);
}