donau

Donation authority for GNU Taler (experimental)
Log | Files | Refs | Submodules | README | LICENSE

commit c560c8da38086afe73ed6881ec4b072e9046c042
parent 53c3a289565a51c622c37bf0ffb5687f49a80eb5
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Fri, 17 Jul 2026 19:11:49 +0200

fix expiration logic

Diffstat:
Msrc/donau/donau-httpd_get-keys.c | 10++++++++--
Msrc/donaudb/iterate_active_signing_keys.c | 3++-
2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/donau/donau-httpd_get-keys.c b/src/donau/donau-httpd_get-keys.c @@ -1067,9 +1067,15 @@ iterate_active_signing_keys_cb ( struct GNUNET_PeerIdentity pid = { .public_key = donau_pub->eddsa_pub }; + struct DH_KeyStateHandle *ksh = cls; struct SigningKey *sk; - (void) cls; + /* Track the earliest signing-key expiration so that DH_keys_get_state() + actually rebuilds the /keys response once a key expires (otherwise + signature_expires stays FOREVER and the time-based rebuild never fires). */ + ksh->signature_expires + = GNUNET_TIME_timestamp_min (ksh->signature_expires, + meta->expire_sign); sk = GNUNET_CONTAINER_multipeermap_get (esign_keys, &pid); if (NULL != sk) @@ -1130,7 +1136,7 @@ build_key_state () "Fetching active signing keys from DB\n"); qs = DONAUDB_iterate_active_signing_keys (DH_context, &iterate_active_signing_keys_cb, - NULL); + ksh); GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Fetched %d active signing keys from DB\n", (int) qs); diff --git a/src/donaudb/iterate_active_signing_keys.c b/src/donaudb/iterate_active_signing_keys.c @@ -101,7 +101,8 @@ DONAUDB_iterate_active_signing_keys ( DONAUDB_IterateActiveSigningKeysCallback cb, void *cb_cls) { - struct GNUNET_TIME_Absolute now = {0}; + struct GNUNET_TIME_Absolute now + = GNUNET_TIME_absolute_get (); struct IterateActiveSigningKeysContext ictx = { .cb = cb, .cb_cls = cb_cls,