Remove unnecessary DRBG_RESEED state
authorDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Mon, 9 Oct 2017 21:51:42 +0000 (23:51 +0200)
committerBen Kaduk <kaduk@mit.edu>
Wed, 18 Oct 2017 13:39:20 +0000 (08:39 -0500)
commite0b625f9db00509af9004b7907d44b78f332754a
treec09b3d7da3c62be375e248909cb94bc40a963ea3
parentc16de9d8329d41a2433d0f273c080d9d06ad7a87
Remove unnecessary DRBG_RESEED state

The DRBG_RESEED state plays an analogue role to the |reseed_required_flag| in
Appendix B.3.4 of [NIST SP 800-90A Rev. 1]. The latter is a local variable,
the scope of which is limited to the RAND_DRBG_generate() function. Hence there
is no need for a DRBG_RESEED state outside of the generate function. This state
was removed and replaced by a local variable |reseed_required|.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/4328)
crypto/rand/drbg_lib.c
crypto/rand/rand_lcl.h