diff options
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; |