diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2011-10-22 17:24:27 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2011-10-22 17:24:27 +0000 |
commit | 5fd722600b3c53f31900442b9a0f9d0ce7dfc629 (patch) | |
tree | 9cb09c51162dc8cf98c21a283a9598ea54d45607 /fips/rand/fips_drbg_lib.c | |
parent | 5b198d5eea726b68925d5487a9c28b66b6d6a717 (diff) |
Check for selftest failure in various places.
Diffstat (limited to 'fips/rand/fips_drbg_lib.c')
-rw-r--r-- | fips/rand/fips_drbg_lib.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fips/rand/fips_drbg_lib.c b/fips/rand/fips_drbg_lib.c index 32e4b83c5e..1596977fd5 100644 --- a/fips/rand/fips_drbg_lib.c +++ b/fips/rand/fips_drbg_lib.c @@ -386,6 +386,12 @@ int FIPS_drbg_generate(DRBG_CTX *dctx, unsigned char *out, size_t outlen, { int r = 0; + if (FIPS_selftest_failed()) + { + FIPSerr(FIPS_F_FIPS_DRBG_GENERATE, FIPS_R_SELFTEST_FAILED); + return 0; + } + if (!fips_drbg_check(dctx)) return 0; |