summaryrefslogtreecommitdiff
path: root/random
diff options
context:
space:
mode:
Diffstat (limited to 'random')
-rw-r--r--random/ChangeLog4
-rw-r--r--random/random-fips.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/random/ChangeLog b/random/ChangeLog
index ed101f68..60702eba 100644
--- a/random/ChangeLog
+++ b/random/ChangeLog
@@ -1,3 +1,7 @@
+2008-09-16 Werner Koch <wk@g10code.com>
+
+ * random-fips.c (x931_aes_driver): No re-seeding with test contexts.
+
2008-09-15 Werner Koch <wk@g10code.com>
* random.c (_gcry_random_init_external_test): New.
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;