diff options
author | Kurt Roeckx <kurt@roeckx.be> | 2017-08-27 17:46:33 +0200 |
---|---|---|
committer | Kurt Roeckx <kurt@roeckx.be> | 2017-08-28 23:15:52 +0200 |
commit | 0b14a5b7ccd1618fe47d74a51c4873144c57ac83 (patch) | |
tree | ded12ac2db33ca847dc4d22ccb93a138e2c18120 /include | |
parent | b23171744b01e473ebbfd6edad70c1c3825ffbcd (diff) |
Don't auto-instantiate a DRBG when trying to use it and it's not
The one creating the DRBG should instantiate it, it's there that we
know which parameters we should use to instantiate it.
This splits the rand init in two parts to avoid a deadlock
because when the global drbg is created it wands to call
rand_add on the global rand method.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
GH: #4268
Diffstat (limited to 'include')
-rw-r--r-- | include/internal/rand.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/internal/rand.h b/include/internal/rand.h index 444c806475..07f141d6cc 100644 --- a/include/internal/rand.h +++ b/include/internal/rand.h @@ -33,6 +33,7 @@ int RAND_DRBG_generate(RAND_DRBG *drbg, unsigned char *out, size_t outlen, const unsigned char *adin, size_t adinlen); int RAND_DRBG_set_reseed_interval(RAND_DRBG *drbg, int interval); RAND_DRBG *RAND_DRBG_get0_global(void); +RAND_DRBG *RAND_DRBG_get0_priv_global(void); /* * EXDATA |