From d98360392ae13211103d48b383906df359788f61 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Wed, 7 Sep 2011 10:26:38 +0000 Subject: [PATCH] Put quick DRBG selftest return after first generate operation. --- fips/rand/fips_drbg_selftest.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fips/rand/fips_drbg_selftest.c b/fips/rand/fips_drbg_selftest.c index 3e18c98609..a06c4fcfd8 100644 --- a/fips/rand/fips_drbg_selftest.c +++ b/fips/rand/fips_drbg_selftest.c @@ -226,6 +226,12 @@ static int fips_drbg_single_kat(DRBG_CTX *dctx, DRBG_SELFTEST_DATA *td, goto err2; } + if (quick) + { + rv = 1; + goto err; + } + t.ent = td->entreseed; t.entlen = td->entreseedlen; @@ -283,12 +289,6 @@ static int fips_drbg_single_kat(DRBG_CTX *dctx, DRBG_SELFTEST_DATA *td, goto err2; } - if (quick) - { - rv = 1; - goto err; - } - t.ent = td->entg_pr; t.entlen = td->entglen_pr; -- GitLab