From 8f15423b76557b8401aee28dafca810b512bd0e8 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 15 May 2015 11:09:10 -0400 Subject: Do not allocate our ed-link crosscert till after tls ctx We need this to prevent some annoying chutney crash-at-starts --- src/or/router.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/or/router.c') 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(); -- cgit v1.2.3-54-g00ecf