From: Dr. Stephen Henson Date: Mon, 5 Sep 2011 15:45:13 +0000 (+0000) Subject: Check reseed interval before generating output. X-Git-Tag: OpenSSL-fips-2_0-rc1~166 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ea17b0feec9b5f455f1bc4b13d7a38ef0549b3d1;p=oweals%2Fopenssl.git Check reseed interval before generating output. --- 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))