[or-cvs] r14596: Bugfix: an authority signature is "unrecognized" if we lack (in tor/branches/tor-0_2_0-patches: . src/or)

nickm at seul.org nickm at seul.org
Mon May 12 21:12:02 UTC 2008


Author: nickm
Date: 2008-05-12 17:12:01 -0400 (Mon, 12 May 2008)
New Revision: 14596

Modified:
   tor/branches/tor-0_2_0-patches/
   tor/branches/tor-0_2_0-patches/ChangeLog
   tor/branches/tor-0_2_0-patches/src/or/networkstatus.c
Log:
 r19713 at catbus:  nickm | 2008-05-12 17:10:37 -0400
 Bugfix: an authority signature is "unrecognized" if we lack a dirserver entry for it, even if we have an older cached certificate that says it is recognized.  This affects clients who remove entries from their dirserver list without clearing their certificate cache.



Property changes on: tor/branches/tor-0_2_0-patches
___________________________________________________________________
 svk:merge ticket from /tor/020 [r19713] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/branches/tor-0_2_0-patches/ChangeLog
===================================================================
--- tor/branches/tor-0_2_0-patches/ChangeLog	2008-05-12 15:42:18 UTC (rev 14595)
+++ tor/branches/tor-0_2_0-patches/ChangeLog	2008-05-12 21:12:01 UTC (rev 14596)
@@ -1,4 +1,8 @@
 Changes in version 0.2.0.26-rc - 2008-05-??
+  o Major bugfixes:
+    - List authority signatures as "unrecognized" based on DirServer lines,
+      not on cert cache.
+
   o Minor features:
     - Add a new V3AuthUseLegacyKey option to make it easier for authorities
       to change their identity keys if they have to.

Modified: tor/branches/tor-0_2_0-patches/src/or/networkstatus.c
===================================================================
--- tor/branches/tor-0_2_0-patches/src/or/networkstatus.c	2008-05-12 15:42:18 UTC (rev 14595)
+++ tor/branches/tor-0_2_0-patches/src/or/networkstatus.c	2008-05-12 21:12:01 UTC (rev 14596)
@@ -392,18 +392,19 @@
   {
     if (!voter->good_signature && !voter->bad_signature && voter->signature) {
       /* we can try to check the signature. */
+      int is_v3_auth = trusteddirserver_get_by_v3_auth_digest(
+                                          voter->identity_digest) != NULL;
       authority_cert_t *cert =
         authority_cert_get_by_digests(voter->identity_digest,
                                       voter->signing_key_digest);
-      if (! cert) {
-        if (!trusteddirserver_get_by_v3_auth_digest(voter->identity_digest)) {
-          smartlist_add(unrecognized, voter);
-          ++n_unknown;
-        } else {
-          smartlist_add(need_certs_from, voter);
-          ++n_missing_key;
-        }
+      if (!is_v3_auth) {
+        smartlist_add(unrecognized, voter);
+        ++n_unknown;
         continue;
+      } else if (!cert) {
+        smartlist_add(need_certs_from, voter);
+        ++n_missing_key;
+        continue;
       }
       if (networkstatus_check_voter_signature(consensus, voter, cert) < 0) {
         smartlist_add(need_certs_from, voter);



More information about the tor-commits mailing list