diff options
author | trinity-1686a <trinity@deuxfleurs.fr> | 2023-03-19 10:31:28 +0100 |
---|---|---|
committer | trinity-1686a <trinity@deuxfleurs.fr> | 2023-03-19 10:31:28 +0100 |
commit | 0c634999c13bdf40843924d54fc3294136774788 (patch) | |
tree | f4eba956d0a62b9911cfadf046fc120644c4a64e /src/feature/relay/relay_metrics.c | |
parent | 0222fc4d714c709fa8a0cee1227805a0e23b18d9 (diff) | |
download | tor-0c634999c13bdf40843924d54fc3294136774788.tar.gz tor-0c634999c13bdf40843924d54fc3294136774788.zip |
don't emit key expiration metric instead of setting it to zero
Diffstat (limited to 'src/feature/relay/relay_metrics.c')
-rw-r--r-- | src/feature/relay/relay_metrics.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/feature/relay/relay_metrics.c b/src/feature/relay/relay_metrics.c index 2e68475f29..6ee75f69f0 100644 --- 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 |