[or-cvs] r12436: More log messages about certificate downloads; try to track (in tor/trunk: . src/or)

nickm at seul.org nickm at seul.org
Thu Nov 8 16:19:04 UTC 2007


Author: nickm
Date: 2007-11-08 11:19:04 -0500 (Thu, 08 Nov 2007)
New Revision: 12436

Modified:
   tor/trunk/
   tor/trunk/ChangeLog
   tor/trunk/src/or/routerlist.c
Log:
 r16569 at catbus:  nickm | 2007-11-08 10:51:11 -0500
 More log messages about certificate downloads; try to track down bug 546.2



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r16569] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2007-11-08 08:33:30 UTC (rev 12435)
+++ tor/trunk/ChangeLog	2007-11-08 16:19:04 UTC (rev 12436)
@@ -76,6 +76,8 @@
     - Make "not enough dir info yet" warnings describe *why* Tor feels
       it doesn't have enough directory info yet.
     - Make the log message for "tls error. breaking." more useful.
+    - Better log messages about certificate downloads, to attempt to
+      track down the second incarnation of bug 546.
 
   o Minor features (bridges):
     - If bridge users set UpdateBridgesFromAuthority, but the digest

Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c	2007-11-08 08:33:30 UTC (rev 12435)
+++ tor/trunk/src/or/routerlist.c	2007-11-08 16:19:04 UTC (rev 12436)
@@ -118,8 +118,9 @@
     ds = trusteddirserver_get_by_v3_auth_digest(
                                        cert->cache_info.identity_digest);
     if (!ds) {
-      log_info(LD_DIR, "Found cached certificate whose key didn't match "
-               "any v3 authority we recognized; skipping.");
+      log_info(LD_DIR, "Found %s certificate whose key didn't match "
+               "any v3 authority we recognized; skipping.",
+               from_store ? "cached" : "downloaded");
       authority_cert_free(cert);
       continue;
     }
@@ -132,6 +133,9 @@
                     cert->cache_info.signed_descriptor_digest,
                     DIGEST_LEN)) {
           /* we already have this one. continue. */
+          log_info(LD_DIR, "Skipping %s certificate for %s that we "
+                   "already have.",
+                   from_store ? "cached" : "downloaded", ds->nickname);
           authority_cert_free(cert);
           found = 1;
           break;
@@ -141,6 +145,10 @@
     if (found)
       continue;
 
+    log_info(LD_DIR, "Adding %s certificate for directory authority %s with "
+             "signing key %s", from_store ? "cached" : "downloaded",
+             ds->nickname, hex_str(cert->signing_key_digest,DIGEST_LEN));
+
     smartlist_add(ds->v3_certs, cert);
     if (options->LearnAuthorityAddrFromCerts &&
         cert->cache_info.published_on > ds->addr_current_at) {
@@ -324,8 +332,12 @@
           continue;
         }
         if (download_status_is_ready(&ds->cert_dl_status, now,
-                                     MAX_CERT_DL_FAILURES))
+                                     MAX_CERT_DL_FAILURES)) {
+          log_notice(LD_DIR, "We're missing a certificate from authority %s "
+                     "with signing key %s: launching request.", ds->nickname,
+                     hex_str(voter->signing_key_digest, DIGEST_LEN));
           smartlist_add(missing_digests, voter->identity_digest);
+        }
       });
   }
   SMARTLIST_FOREACH(trusted_dir_servers, trusted_dir_server_t *, ds,
@@ -348,8 +360,11 @@
           }
         });
       if (!found && download_status_is_ready(&ds->cert_dl_status, now,
-                                             MAX_CERT_DL_FAILURES))
+                                             MAX_CERT_DL_FAILURES)) {
+        log_notice(LD_DIR, "No current certificate known for authority %s; "
+                   "launching request.", ds->nickname);
         smartlist_add(missing_digests, ds->v3_identity_digest);
+      }
     });
 
   if (!smartlist_len(missing_digests)) {
@@ -378,8 +393,6 @@
     SMARTLIST_FOREACH(fps, char *, cp, tor_free(cp));
     smartlist_free(fps);
   }
-  log_notice(LD_DIR, "Launching request for %d missing certificates",
-             smartlist_len(missing_digests));
   directory_get_from_dirserver(DIR_PURPOSE_FETCH_CERTIFICATE, 0,
                                resource, 1);
 



More information about the tor-commits mailing list