projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bdcacd9
)
Instantiate when RAND_status() checks
author
Rich Salz
<rsalz@openssl.org>
Sat, 12 Aug 2017 22:19:50 +0000
(18:19 -0400)
committer
Rich Salz
<rsalz@openssl.org>
Sun, 13 Aug 2017 19:52:30 +0000
(15:52 -0400)
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
(Merged from https://github.com/openssl/openssl/pull/4150)
crypto/rand/drbg_lib.c
patch
|
blob
|
history
diff --git
a/crypto/rand/drbg_lib.c
b/crypto/rand/drbg_lib.c
index e9502db90d9de9a315fe1f281a29620a3b6148e4..0da4d48f55a95aab44e7ea187ba184295e639068 100644
(file)
--- a/
crypto/rand/drbg_lib.c
+++ b/
crypto/rand/drbg_lib.c
@@
-403,6
+403,8
@@
static int drbg_status(void)
int ret;
CRYPTO_THREAD_write_lock(rand_drbg.lock);
+ if (rand_drbg.state == DRBG_UNINITIALISED)
+ RAND_DRBG_instantiate(&rand_drbg, NULL, 0);
ret = rand_drbg.state == DRBG_READY ? 1 : 0;
CRYPTO_THREAD_unlock(rand_drbg.lock);
return ret;