Pārlūkot izejas kodu

r15418@catbus: nickm | 2007-09-27 12:37:59 -0400
Fix a stupid logic error in authority_cert_get_by_sk_digest: the presence of an authority lacking a v3 cert does not mean that subsequent authorities lack them too.


svn:r11668

Nick Mathewson 18 gadi atpakaļ
vecāks
revīzija
a1c5a807d0
2 mainītis faili ar 5 papildinājumiem un 1 dzēšanām
  1. 4 0
      ChangeLog
  2. 1 1
      src/or/routerlist.c

+ 4 - 0
ChangeLog

@@ -8,6 +8,10 @@ Changes in version 0.2.0.8-alpha - 2007-??-??
       OR address is readable, set the port correctly.  (Previously we
       OR address is readable, set the port correctly.  (Previously we
       were reporting the dir port.)  Bugfix on 0.1.2.x.
       were reporting the dir port.)  Bugfix on 0.1.2.x.
 
 
+  o Minor bugfixes (v3 directory code):
+    - Fix logic to look up a cert by its signing key digest.  Bugfix on
+      0.2.0.7-alpha.
+
 Changes in version 0.2.0.7-alpha - 2007-09-21
 Changes in version 0.2.0.7-alpha - 2007-09-21
   o New directory authorities:
   o New directory authorities:
     - Set up moria1 and tor26 as the first v3 directory authorities. See
     - Set up moria1 and tor26 as the first v3 directory authorities. See

+ 1 - 1
src/or/routerlist.c

@@ -388,7 +388,7 @@ authority_cert_get_by_sk_digest(const char *sk_digest)
   SMARTLIST_FOREACH(trusted_dir_servers, trusted_dir_server_t *, ds,
   SMARTLIST_FOREACH(trusted_dir_servers, trusted_dir_server_t *, ds,
   {
   {
     if (!ds->v3_certs)
     if (!ds->v3_certs)
-      return NULL;
+      continue;
     SMARTLIST_FOREACH(ds->v3_certs, authority_cert_t *, cert,
     SMARTLIST_FOREACH(ds->v3_certs, authority_cert_t *, cert,
     {
     {
       if (!memcmp(cert->signing_key_digest, sk_digest, DIGEST_LEN))
       if (!memcmp(cert->signing_key_digest, sk_digest, DIGEST_LEN))