[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [doctor/master] Make message about missing signatures clearer.
commit b25999914b1e995833aac211d580bd454558bf11
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Mon Jul 8 13:57:53 2013 +0200
Make message about missing signatures clearer.
We shouldn't list the authorities publishing consensuses that are missing
signatures of previously voting authorities, but we should list the
authorities whose signatures are missing.
Implements #9197.
---
src/org/torproject/doctor/Checker.java | 9 +++++++--
src/org/torproject/doctor/StatusFileReport.java | 7 +++----
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/org/torproject/doctor/Checker.java b/src/org/torproject/doctor/Checker.java
index 707bd62..9d7aed8 100644
--- a/src/org/torproject/doctor/Checker.java
+++ b/src/org/torproject/doctor/Checker.java
@@ -158,7 +158,6 @@ public class Checker {
SortedSet<String> missingSignatures = new TreeSet<String>();
for (Map.Entry<String, RelayNetworkStatusConsensus> e :
downloadedConsensuses.entrySet()) {
- String nickname = e.getKey();
RelayNetworkStatusConsensus downloadedConsensus = e.getValue();
if (downloadedConsensus.getValidAfterMillis() < fresh) {
continue;
@@ -166,7 +165,13 @@ public class Checker {
if (!downloadedConsensus.getDirectorySignatures().keySet().
containsAll(downloadedConsensus.getDirSourceEntries().
keySet())) {
- missingSignatures.add(nickname);
+ for (String dirSource : downloadedConsensus.getDirSourceEntries().
+ keySet()) {
+ if (!downloadedConsensus.getDirectorySignatures().containsKey(
+ dirSource)) {
+ missingSignatures.add(dirSource);
+ }
+ }
}
}
if (!missingSignatures.isEmpty()) {
diff --git a/src/org/torproject/doctor/StatusFileReport.java b/src/org/torproject/doctor/StatusFileReport.java
index 1e23639..c5eca29 100644
--- a/src/org/torproject/doctor/StatusFileReport.java
+++ b/src/org/torproject/doctor/StatusFileReport.java
@@ -158,10 +158,9 @@ public class StatusFileReport {
+ "authorities: " + detailsString, 150L * 60L * 1000L);
break;
case ConsensusMissingSignatures:
- warningStrings.put("NOTICE: The consensuses downloaded from "
- + "the following authorities are missing signatures from "
- + "previously voting authorities: " + detailsString,
- 150L * 60L * 1000L);
+ warningStrings.put("NOTICE: The signatures of the following, "
+ + "previously voting authorities are missing from at least "
+ + "one consensus: " + detailsString, 150L * 60L * 1000L);
break;
case MissingAuthorities:
warningStrings.put("WARNING: The following authorities are "
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits