[or-cvs] r14455: Only using v3 authorities and using the proper digest works (tor/trunk/src/or)

weasel at seul.org weasel at seul.org
Thu Apr 24 21:29:48 UTC 2008


Author: weasel
Date: 2008-04-24 17:29:47 -0400 (Thu, 24 Apr 2008)
New Revision: 14455

Modified:
   tor/trunk/src/or/directory.c
Log:
Only using v3 authorities and using the proper digest works better

Modified: tor/trunk/src/or/directory.c
===================================================================
--- tor/trunk/src/or/directory.c	2008-04-24 15:51:55 UTC (rev 14454)
+++ tor/trunk/src/or/directory.c	2008-04-24 21:29:47 UTC (rev 14455)
@@ -807,9 +807,13 @@
     SMARTLIST_FOREACH(router_get_trusted_dir_servers(),
                       trusted_dir_server_t *, ds,
       {
-        char *hex = tor_malloc(2*CONDITIONAL_CONSENSUS_FPR_LEN+1);
+        char *hex;
+        if (!(ds->type & V3_AUTHORITY))
+          continue;
+
+        hex = tor_malloc(2*CONDITIONAL_CONSENSUS_FPR_LEN+1);
         base16_encode(hex, 2*CONDITIONAL_CONSENSUS_FPR_LEN+1,
-                      ds->digest, CONDITIONAL_CONSENSUS_FPR_LEN);
+                      ds->v3_identity_digest, CONDITIONAL_CONSENSUS_FPR_LEN);
         smartlist_add(authority_digets, hex);
       });
     smartlist_sort(authority_digets, _compare_strs);



More information about the tor-commits mailing list