aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2019-04-05 16:29:48 +0200
committerMarcello Stanisci <stanisci.m@gmail.com>2019-04-05 16:30:19 +0200
commita19baaccf3c93390a0c40395454c667440f6b2bd (patch)
tree5fdf57afd77047b68270d581491119ea823dbcef /src
parent32cdef2b622f472c5d0b522f0551087fbca6dc4c (diff)
Do not include legally expired keys into /keys response.
Diffstat (limited to 'src')
-rw-r--r--src/exchange/taler-exchange-httpd_keystate.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/exchange/taler-exchange-httpd_keystate.c b/src/exchange/taler-exchange-httpd_keystate.c
index 0ee3806fa..ad1883ba8 100644
--- a/src/exchange/taler-exchange-httpd_keystate.c
+++ b/src/exchange/taler-exchange-httpd_keystate.c
@@ -1494,6 +1494,13 @@ reload_public_denoms_cb (void *cls,
struct ResponseFactoryContext *rfc = cls;
struct TALER_EXCHANGEDB_DenominationKeyIssueInformation dki;
+ if (rfc->now.abs_value_us > GNUNET_TIME_absolute_ntoh
+ (issue->properties.expire_legal).abs_value_us)
+ {
+ /* Expired key, discard. */
+ return;
+ }
+
if (NULL !=
GNUNET_CONTAINER_multihashmap_get (rfc->key_state->denomkey_map,
&issue->properties.denom_hash))