Преглед изворни кода

Survive unparseable cached cert file

Roger Dingledine пре 17 година
родитељ
комит
eb829cc330
2 измењених фајлова са 5 додато и 2 уклоњено
  1. 1 0
      ChangeLog
  2. 4 2
      src/or/main.c

+ 1 - 0
ChangeLog

@@ -43,6 +43,7 @@ Changes in version 0.2.2.1-alpha - 2009-0?-??
     - If any the v3 certs we download are unparseable, we should actually
     - If any the v3 certs we download are unparseable, we should actually
       notice the failure so we don't retry indefinitely. Bugfix on
       notice the failure so we don't retry indefinitely. Bugfix on
       0.2.0.x; reported by "rotator".
       0.2.0.x; reported by "rotator".
+    - If the cached cert file is unparseable, warn but don't exit.
 
 
   o Deprecated and removed features:
   o Deprecated and removed features:
     - The controller no longer accepts the old obsolete "addr-mappings/"
     - The controller no longer accepts the old obsolete "addr-mappings/"

+ 4 - 2
src/or/main.c

@@ -1410,8 +1410,10 @@ do_main_loop(void)
   /* initialize the bootstrap status events to know we're starting up */
   /* initialize the bootstrap status events to know we're starting up */
   control_event_bootstrap(BOOTSTRAP_STATUS_STARTING, 0);
   control_event_bootstrap(BOOTSTRAP_STATUS_STARTING, 0);
 
 
-  if (trusted_dirs_reload_certs())
-    return -1;
+  if (trusted_dirs_reload_certs()) {
+    log_warn(LD_DIR,
+             "Couldn't load all cached v3 certificates. Starting anyway.");
+  }
   if (router_reload_v2_networkstatus()) {
   if (router_reload_v2_networkstatus()) {
     return -1;
     return -1;
   }
   }