aboutsummaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-07-21 07:50:06 +0000
committerRoger Dingledine <arma@torproject.org>2004-07-21 07:50:06 +0000
commit3e97c12f24398db96d4f1926020656a1561082ca (patch)
treed634e5d3acfd97a5f8f753d6a622db5ee94fb9e3 /src/or/main.c
parent2d514037b7c9fa8a04eca4cf6e3864953b020d16 (diff)
downloadtor-3e97c12f24398db96d4f1926020656a1561082ca.tar
tor-3e97c12f24398db96d4f1926020656a1561082ca.tar.gz
rearrange to prepare to solve the authdirserver initialization
precedence problem. doesn't actually solve it yet. svn:r2079
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 759487c0a..b3898fff3 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -763,13 +763,6 @@ static int do_main_loop(void) {
/* 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();
@@ -779,6 +772,13 @@ static int do_main_loop(void) {
}
}
+ /* 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();