[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [doctor/master] Including certificate expiration date in notice
commit edb251251dda0b6aae9e4b2c5604569e6646da2f
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Tue Sep 24 20:35:10 2013 -0700
Including certificate expiration date in notice
Suggestion by Karsten. Didn't catch that the java version did this - it's
certainly a good thing to include.
---
consensus_health_checker.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/consensus_health_checker.py b/consensus_health_checker.py
index 6c78880..45e6f64 100755
--- a/consensus_health_checker.py
+++ b/consensus_health_checker.py
@@ -317,16 +317,17 @@ def certificate_expiration(latest_consensus, consensuses, votes):
# votes should only have a single authority entry (the one that issued this vote)
cert_expiration = vote.directory_authorities[0].key_certificate.expires
+ expiration_label = '%s (%s)' % (authority, cert_expiration.strftime('%Y-%m-%d %H-%M-%S'))
if (cert_expiration - current_time) <= datetime.timedelta(days = 14):
if rate_limit_notice('cert_expiration.two_weeks.%s' % authority, days = 14):
- issues.append(Issue.for_msg(Runlevel.WARNING, 'CERTIFICATE_ABOUT_TO_EXPIRE', 'two weeks', authority))
+ issues.append(Issue.for_msg(Runlevel.WARNING, 'CERTIFICATE_ABOUT_TO_EXPIRE', 'two weeks', expiration_label))
elif (cert_expiration - current_time) <= datetime.timedelta(days = 60):
if rate_limit_notice('cert_expiration.two_months.%s' % authority, days = 60):
- issues.append(Issue.for_msg(Runlevel.NOTICE, 'CERTIFICATE_ABOUT_TO_EXPIRE', 'two months', authority))
+ issues.append(Issue.for_msg(Runlevel.NOTICE, 'CERTIFICATE_ABOUT_TO_EXPIRE', 'two months', expiration_label))
elif (cert_expiration - current_time) <= datetime.timedelta(days = 90):
if rate_limit_notice('cert_expiration.three_months.%s' % authority, days = 90):
- issues.append(Issue.for_msg(Runlevel.NOTICE, 'CERTIFICATE_ABOUT_TO_EXPIRE', 'three months', authority))
+ issues.append(Issue.for_msg(Runlevel.NOTICE, 'CERTIFICATE_ABOUT_TO_EXPIRE', 'three months', expiration_label))
return issues
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits