summaryrefslogtreecommitdiffstats
path: root/fips/rand/fips_drbg_selftest.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2011-09-21 18:24:12 +0000
committerDr. Stephen Henson <steve@openssl.org>2011-09-21 18:24:12 +0000
commit05272d4c516fb1167581d35b31a7f815eafa9c57 (patch)
treea362a6be2cda577a48c813d380639deb6cb42f1b /fips/rand/fips_drbg_selftest.c
parent4420b3b17acf19f78f4fdea1a69d5f0a644c8154 (diff)
Perform health check on all reseed operations not associated with
prediction resistance requests. Although SP 800-90 is arguably unclear on whether this is necessary adding an additional check has minimal penalty (very few applications will make an explicit reseed request).
Diffstat (limited to 'fips/rand/fips_drbg_selftest.c')
-rw-r--r--fips/rand/fips_drbg_selftest.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fips/rand/fips_drbg_selftest.c b/fips/rand/fips_drbg_selftest.c
index 76667a0167..3bc7eab95c 100644
--- a/fips/rand/fips_drbg_selftest.c
+++ b/fips/rand/fips_drbg_selftest.c
@@ -772,9 +772,8 @@ int fips_drbg_kat(DRBG_CTX *dctx, int nid, unsigned int flags)
{
if (td->nid == nid && td->flags == flags)
{
- rv = fips_drbg_single_kat(dctx, td, 0);
- if (rv <= 0)
- return rv;
+ if (!fips_drbg_single_kat(dctx, td, 0))
+ return 0;
return fips_drbg_health_check(dctx, td);
}
}