summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>2018-02-03 21:13:19 +0100
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>2018-02-05 20:05:14 +0100
commit58351fbd02e9960af199df99f6f003419c1487a4 (patch)
tree932f740dd09f28f0863eb448a1872f41a818702e
parent1c4b15458670aea5d3849d4b57b8c0ce34a54fbe (diff)
drbg_bytes: remove check for DRBG_UNINITIALIZED state
This check not only prevented the automatic reinstantiation of the DRBG, which is implemented in RAND_DRBG_generate(), but also prevented an error message from being generated in the case of failure. Reviewed-by: Kurt Roeckx <kurt@roeckx.be> (Merged from https://github.com/openssl/openssl/pull/5251)
-rw-r--r--crypto/rand/drbg_lib.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/crypto/rand/drbg_lib.c b/crypto/rand/drbg_lib.c
index cb2f9e8d92..974e3bbd11 100644
--- a/crypto/rand/drbg_lib.c
+++ b/crypto/rand/drbg_lib.c
@@ -772,9 +772,6 @@ static int drbg_bytes(unsigned char *out, int count)
return 0;
CRYPTO_THREAD_write_lock(drbg->lock);
- if (drbg->state == DRBG_UNINITIALISED)
- goto err;
-
for ( ; count > 0; count -= chunk, out += chunk) {
chunk = count;
if (chunk > drbg->max_request)