From 2f1962593d4465b50ad7ec5781fa08cd44aec820 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 16 Sep 2008 07:48:25 +0000 Subject: Finish FIPS random test driver. Disable re-seeding if in test mode. --- random/random-fips.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'random/random-fips.c') diff --git a/random/random-fips.c b/random/random-fips.c index 90499db2..eb1706fc 100644 --- a/random/random-fips.c +++ b/random/random-fips.c @@ -455,8 +455,9 @@ x931_aes_driver (unsigned char *output, size_t length, rng_context_t rng_ctx) while (length) { - /* We require a new seed after some time. */ - if (rng_ctx->use_counter > SEED_TTL) + /* Unless we are running with a test context, we require a new + seed after some time. */ + if (!rng_ctx->test_dt_ptr && rng_ctx->use_counter > SEED_TTL) { x931_reseed (rng_ctx); rng_ctx->use_counter = 0; -- cgit v1.2.1