tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit 0c634999c13bdf40843924d54fc3294136774788
parent 0222fc4d714c709fa8a0cee1227805a0e23b18d9
Author: trinity-1686a <trinity@deuxfleurs.fr>
Date:   Sun, 19 Mar 2023 10:31:28 +0100

don't emit key expiration metric instead of setting it to zero

Diffstat:
Msrc/feature/relay/relay_metrics.c | 9+++------
1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/feature/relay/relay_metrics.c b/src/feature/relay/relay_metrics.c @@ -1009,18 +1009,15 @@ fill_signing_cert_expiry(void) const tor_cert_t *signing_key; const relay_metrics_entry_t *rentry = &base_metrics[RELAY_METRICS_SIGNING_CERT_EXPIRY]; - uint64_t valid_until = 0; - - sentry = metrics_store_add(the_store, rentry->type, rentry->name, - rentry->help); if (get_options()->OfflineMasterKey) { signing_key = get_master_signing_key_cert(); if (signing_key) { - valid_until = signing_key->valid_until; + sentry = metrics_store_add(the_store, rentry->type, rentry->name, + rentry->help); + metrics_store_entry_update(sentry, signing_key->valid_until); } } - metrics_store_entry_update(sentry, valid_until); } /** Reset the global store and fill it with all the metrics from base_metrics