Fix: drbgtest fails when tests are executed in random order
authorDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Mon, 19 Mar 2018 20:11:50 +0000 (21:11 +0100)
committerMatt Caswell <matt@openssl.org>
Mon, 19 Mar 2018 22:55:11 +0000 (22:55 +0000)
commit59f124f90f52395c240fcd2f387a91234b0d25be
tree181eceda18fda6436dfd56e4765a971fdb7e9672
parent8f8be103fd7d8b5992724d618c99cbddd7dd00d7
Fix: drbgtest fails when tests are executed in random order

[extended tests]

The test_rand_reseed assumed that the global DRBGs were not used
previously. This assumption is false when the tests are executed
in random order (OPENSSL_TEST_RAND_ORDER). So we uninstantiate
them first and add a test for the first instantiation.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5680)
test/drbgtest.c