summaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-05-15 11:09:10 -0400
committerNick Mathewson <nickm@torproject.org>2015-05-28 10:47:47 -0400
commit8f15423b76557b8401aee28dafca810b512bd0e8 (patch)
tree980f5f65c57c08cded0e7377e1203b9996641770 /src/or/router.c
parent3bee74c6d115131f4850a07a5c12db21ae6f3193 (diff)
downloadtor-8f15423b76557b8401aee28dafca810b512bd0e8.tar.gz
tor-8f15423b76557b8401aee28dafca810b512bd0e8.zip
Do not allocate our ed-link crosscert till after tls ctx
We need this to prevent some annoying chutney crash-at-starts
Diffstat (limited to 'src/or/router.c')
-rw-r--r--src/or/router.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/or/router.c b/src/or/router.c
index 1e433ed469..00cd0578c6 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -866,8 +866,7 @@ init_keys(void)
}
/* 1d. Load all ed25519 keys */
- if (load_ed_keys(options,now) < 0 ||
- generate_ed_link_cert(options,now))
+ if (load_ed_keys(options,now) < 0)
return -1;
/* 2. Read onion key. Make it if none is found. */
@@ -935,6 +934,13 @@ init_keys(void)
return -1;
}
+ /* 3b. Get an ed25519 link certificate. Note that we need to do this
+ * after we set up the TLS context */
+ if (generate_ed_link_cert(options, now) < 0) {
+ log_err(LD_GENERAL,"Couldn't make link cert");
+ return -1;
+ }
+
/* 4. Build our router descriptor. */
/* Must be called after keys are initialized. */
mydesc = router_get_my_descriptor();