summaryrefslogtreecommitdiffstats
path: root/fips
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2011-09-05 15:32:32 +0000
committerDr. Stephen Henson <steve@openssl.org>2011-09-05 15:32:32 +0000
commit7634137b8aed68ab776a256a5f16f2deb1537f29 (patch)
tree7c0f5b5d4ade2d4025827d08833841c715588a77 /fips
parent2c472780c0c8ea49a87f7a1b1265bcb0b27a3f39 (diff)
Place DRBG in error state if health check fails.
Diffstat (limited to 'fips')
-rw-r--r--fips/rand/fips_drbg_lib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fips/rand/fips_drbg_lib.c b/fips/rand/fips_drbg_lib.c
index 3478864eec..f5f365b01e 100644
--- a/fips/rand/fips_drbg_lib.c
+++ b/fips/rand/fips_drbg_lib.c
@@ -96,6 +96,7 @@ int FIPS_drbg_init(DRBG_CTX *dctx, int type, unsigned int flags)
if (!fips_drbg_kat(&tctx, type, flags | DRBG_FLAG_TEST))
{
FIPSerr(FIPS_F_FIPS_DRBG_INIT, FIPS_R_SELFTEST_FAILURE);
+ dctx->status = DRBG_STATUS_ERROR;
return 0;
}
}
@@ -333,6 +334,7 @@ static int fips_drbg_check(DRBG_CTX *dctx)
dctx->flags | DRBG_FLAG_TEST))
{
FIPSerr(FIPS_F_FIPS_DRBG_CHECK, FIPS_R_SELFTEST_FAILURE);
+ dctx->status = DRBG_STATUS_ERROR;
return 0;
}
dctx->health_check_cnt = 0;