diff options
author | Christian Grothoff <grothoff@gnunet.org> | 2021-11-21 12:47:16 +0100 |
---|---|---|
committer | Christian Grothoff <grothoff@gnunet.org> | 2021-11-21 12:47:33 +0100 |
commit | 5159badd0e999fbcd610e3db22b5415571d9fa54 (patch) | |
tree | b2c139ab011fdec76a34f908117b7deae496deae /src/util/test_helper_eddsa.c | |
parent | 56318f53e201f0f91e6cd50d485f6ff44b8cf9d0 (diff) | |
download | exchange-5159badd0e999fbcd610e3db22b5415571d9fa54.tar.xz |
another fix related to #7099
Diffstat (limited to 'src/util/test_helper_eddsa.c')
-rw-r--r-- | src/util/test_helper_eddsa.c | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/src/util/test_helper_eddsa.c b/src/util/test_helper_eddsa.c index ddc2fc9fc..7ce457d8d 100644 --- a/src/util/test_helper_eddsa.c +++ b/src/util/test_helper_eddsa.c @@ -27,7 +27,7 @@ * we should never have more than 6 active keys, plus for during * key expiration / revocation. */ -#define MAX_KEYS 7 +#define MAX_KEYS 20 /** * How many random key revocations should we test? @@ -121,7 +121,14 @@ key_cb (void *cls, (void) cls; (void) sm_pub; (void) sm_sig; - if (0 == validity_duration.rel_value_us) + + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Update on key %s (%s)...", + TALER_B2S (exchange_pub), + GNUNET_STRINGS_relative_time_to_string (validity_duration, + GNUNET_YES)); + + if (GNUNET_TIME_relative_is_zero (validity_duration)) { bool found = false; @@ -190,14 +197,20 @@ test_revocation (struct TALER_CRYPTO_ExchangeSignHelper *esh) } keys[j].revoked = true; fprintf (stderr, - "Revoking key ..."); + "Revoking key %s ...", + TALER_B2S (&keys[j].exchange_pub)); TALER_CRYPTO_helper_esign_revoke (esh, &keys[j].exchange_pub); for (unsigned int k = 0; k<1000; k++) { TALER_CRYPTO_helper_esign_poll (esh); - if (! keys[j].revoked) + if ( (! keys[j].revoked) || + (GNUNET_TIME_absolute_is_past ( + GNUNET_TIME_absolute_add (keys[j].start_time, + keys[j].validity_duration))) ) + { break; + } nanosleep (&req, NULL); fprintf (stderr, "."); } @@ -470,7 +483,7 @@ main (int argc, (void) argc; (void) argv; GNUNET_log_setup ("test-helper-eddsa", - "WARNING", + "INFO", NULL); GNUNET_OS_init (TALER_project_data_default ()); libexec_dir = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_BINDIR); @@ -486,7 +499,7 @@ main (int argc, "-c", "test_helper_eddsa.conf", "-L", - "WARNING", + "INFO", NULL); if (NULL == helper) { |