md_rand.c: don't stop polling until properly initialized
authorDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Thu, 18 Oct 2018 21:04:32 +0000 (23:04 +0200)
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Mon, 22 Oct 2018 12:47:34 +0000 (14:47 +0200)
commitbd04577743ec3b1e605039ee31e10616fee5f05f
treeb3d8cb37d085dab252a7597232407f8f2ecea2b4
parentf2828a14fbe2ce56b5090f45b2a9a6e749d33b22
md_rand.c: don't stop polling until properly initialized

Previously, the RNG sets `initialized=1` after the first call to
RAND_poll(), although its criterion for being initialized actually
is whether condition `entropy >= ENTROPY_NEEDED` is true.

This commit now assigns `initialized=(entropy >= ENTROPY_NEEDED)`,
which has the effect that on the next call, RAND_poll() will be
called again, if it previously failed to obtain enough entropy.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/7438)
crypto/rand/md_rand.c