diff options
author | Werner Koch <wk@gnupg.org> | 2008-09-16 07:48:25 +0000 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2008-09-16 07:48:25 +0000 |
commit | 2f1962593d4465b50ad7ec5781fa08cd44aec820 (patch) | |
tree | bb6d2d62c682038bc8f91d12b111f6f1709b9d4b /random/random-fips.c | |
parent | d84a7e0d5ed00dc6f3c32e755f9cca5977487538 (diff) | |
download | libgcrypt-2f1962593d4465b50ad7ec5781fa08cd44aec820.tar.gz |
Finish FIPS random test driver.
Disable re-seeding if in test mode.
Diffstat (limited to 'random/random-fips.c')
-rw-r--r-- | random/random-fips.c | 5 |
1 files changed, 3 insertions, 2 deletions
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; |