summaryrefslogtreecommitdiffstats
path: root/fips
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2011-09-05 15:45:13 +0000
committerDr. Stephen Henson <steve@openssl.org>2011-09-05 15:45:13 +0000
commitea17b0feec9b5f455f1bc4b13d7a38ef0549b3d1 (patch)
tree5040323469285683645c25c6b6f9668daaed90d2 /fips
parent7634137b8aed68ab776a256a5f16f2deb1537f29 (diff)
Check reseed interval before generating output.
Diffstat (limited to 'fips')
-rw-r--r--fips/rand/fips_drbg_lib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fips/rand/fips_drbg_lib.c b/fips/rand/fips_drbg_lib.c
index f5f365b01e..a0bb9eda64 100644
--- a/fips/rand/fips_drbg_lib.c
+++ b/fips/rand/fips_drbg_lib.c
@@ -373,6 +373,9 @@ int FIPS_drbg_generate(DRBG_CTX *dctx, unsigned char *out, size_t outlen,
goto end;
}
+ if (dctx->reseed_counter >= dctx->reseed_interval)
+ dctx->status = DRBG_STATUS_RESEED;
+
if (dctx->status == DRBG_STATUS_RESEED || prediction_resistance)
{
if (!FIPS_drbg_reseed(dctx, adin, adinlen))