Don't auto-instantiate a DRBG when trying to use it and it's not
authorKurt Roeckx <kurt@roeckx.be>
Sun, 27 Aug 2017 15:46:33 +0000 (17:46 +0200)
committerKurt Roeckx <kurt@roeckx.be>
Mon, 28 Aug 2017 21:15:52 +0000 (23:15 +0200)
commit0b14a5b7ccd1618fe47d74a51c4873144c57ac83
treeded12ac2db33ca847dc4d22ccb93a138e2c18120
parentb23171744b01e473ebbfd6edad70c1c3825ffbcd
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
crypto/include/internal/rand_int.h
crypto/init.c
crypto/rand/drbg_lib.c
crypto/rand/rand_lib.c
include/internal/rand.h
ssl/ssl_lib.c
util/libcrypto.num