summaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
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 759487c0ae..b3898fff39 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();