aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-04-16 14:17:33 +0200
committerChristian Grothoff <christian@grothoff.org>2021-04-16 14:17:33 +0200
commit74ea2da2b0aa978b09ee44c3e377f730a73c667f (patch)
treec967ad01e3f6336b80391eaf3b2545a403efdac5
parent453d122c30b33c4481bb1624db722596ecf1453e (diff)
skip keys in future keys if they already expired
-rw-r--r--src/exchange/taler-exchange-httpd_keys.c4
-rw-r--r--src/util/secmod_signatures.c5
2 files changed, 9 insertions, 0 deletions
diff --git a/src/exchange/taler-exchange-httpd_keys.c b/src/exchange/taler-exchange-httpd_keys.c
index 50d700a81..579cb6b36 100644
--- a/src/exchange/taler-exchange-httpd_keys.c
+++ b/src/exchange/taler-exchange-httpd_keys.c
@@ -2312,6 +2312,8 @@ add_future_denomkey_cb (void *cls,
h_denom_pub);
if (NULL != dk)
return GNUNET_OK; /* skip: this key is already active! */
+ if (0 == hd->validity_duration.rel_value_us)
+ return GNUNET_OK; /* this key already expired! */
meta.start = hd->start_time;
meta.expire_withdraw = GNUNET_TIME_absolute_add (meta.start,
hd->validity_duration);
@@ -2386,6 +2388,8 @@ add_future_signkey_cb (void *cls,
pid);
if (NULL != sk)
return GNUNET_OK; /* skip: this key is already active */
+ if (0 == hsk->validity_duration.rel_value_us)
+ return GNUNET_OK; /* this key already expired! */
stamp_expire = GNUNET_TIME_absolute_add (hsk->start_time,
hsk->validity_duration);
legal_end = GNUNET_TIME_absolute_add (stamp_expire,
diff --git a/src/util/secmod_signatures.c b/src/util/secmod_signatures.c
index 3df68861d..31670dfdb 100644
--- a/src/util/secmod_signatures.c
+++ b/src/util/secmod_signatures.c
@@ -61,6 +61,11 @@ TALER_exchange_secmod_eddsa_verify (
.duration = GNUNET_TIME_relative_hton (duration)
};
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Verifying key `%s' with duration %s\n",
+ TALER_B2S (exchange_pub),
+ GNUNET_STRINGS_relative_time_to_string (duration,
+ GNUNET_NO));
return
GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_SM_SIGNING_KEY,
&ska,