summaryrefslogtreecommitdiffstats
path: root/test/drbgtest.c
diff options
context:
space:
mode:
authorDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>2017-12-28 21:42:14 +0100
committerPauli <paul.dale@oracle.com>2018-01-04 11:47:31 +1000
commit8212d50576147cd5db87b1e2f4607a6d5b5f435f (patch)
tree016885875e4a7ed596423afc9fdb8954cc66abaf /test/drbgtest.c
parent4e585e720195788c9546a9ce71d63dafdfd2aaf1 (diff)
crypto/rand: restore the generic DRBG implementation
The DRGB concept described in NIST SP 800-90A provides for having different algorithms to generate random output. In fact, the FIPS object module used to implement three of them, CTR DRBG, HASH DRBG and HMAC DRBG. When the FIPS code was ported to master in #4019, two of the three algorithms were dropped, and together with those the entire code that made RAND_DRBG generic was removed, since only one concrete implementation was left. This commit restores the original generic implementation of the DRBG, making it possible again to add additional implementations using different algorithms (like RAND_DRBG_CHACHA20) in the future. Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4998)
Diffstat (limited to 'test/drbgtest.c')
-rw-r--r--test/drbgtest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/drbgtest.c b/test/drbgtest.c
index 68c169793c..fcb4b28460 100644
--- a/test/drbgtest.c
+++ b/test/drbgtest.c
@@ -438,7 +438,7 @@ static int error_check(DRBG_SELFTEST_DATA *td)
goto err;
/* Standard says we have to check uninstantiate really zeroes */
- if (!TEST_mem_eq(zero, sizeof(drbg->ctr), &drbg->ctr, sizeof(drbg->ctr)))
+ if (!TEST_mem_eq(zero, sizeof(drbg->data), &drbg->data, sizeof(drbg->data)))
goto err;
ret = 1;