precedence problem. doesn't actually solve it yet.
svn:r2079
/* Intialize the service cache. */
rend_cache_init();
- /* load the private keys, if we're supposed to have them, and set up the
- * TLS context. */
- if (init_keys() < 0 || rend_service_load_keys() < 0) {
- log_fn(LOG_ERR,"Error initializing keys; exiting");
- return -1;
- }
-
/* load the routers file */
if(options.RouterFile) {
routerlist_clear_trusted_directories();
}
}
+ /* load the private keys, if we're supposed to have them, and set up the
+ * TLS context. */
+ if (init_keys() < 0 || rend_service_load_keys() < 0) {
+ log_fn(LOG_ERR,"Error initializing keys; exiting");
+ return -1;
+ }
+
if(authdir_mode()) {
/* the directory is already here, run startup things */
directory_has_arrived();
ri->bandwidthburst = options.BandwidthBurst;
ri->exit_policy = NULL; /* zero it out first */
router_add_exit_policy_from_config(ri);
+ ri->is_trusted_dir = (ri->dir_port &&
+ router_digest_is_trusted_dir(ri->identity_digest));
if (desc_routerinfo)
routerinfo_free(desc_routerinfo);
desc_routerinfo = ri;
log_fn(LOG_WARN, "Couldn't dump router to string.");
return -1;
}
- ri->is_trusted_dir = (ri->dir_port &&
- router_digest_is_trusted_dir(ri->identity_digest));
return 0;
}
routerinfo_t *r = smartlist_get(new_list->routers, i);
if (r->dir_port) {
char *b;
+ log_fn(LOG_DEBUG,"Trusting router %s.", r->nickname);
r->is_trusted_dir = 1;
b = tor_malloc(DIGEST_LEN);
memcpy(b, r->identity_digest, DIGEST_LEN);