From 005a20ec859aa1c9e2f6d6bf5a1e70069f7f20f5 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 21 Mar 2016 11:57:23 -0400 Subject: [PATCH 1/2] Log a better message when OfflineMasterKey is set. Fixes bug 18133; bugfix on 0.2.7.2-alpha. --- changes/bug18133 | 4 ++++ src/or/routerkeys.c | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 changes/bug18133 diff --git a/changes/bug18133 b/changes/bug18133 new file mode 100644 index 0000000000..177d286495 --- /dev/null +++ b/changes/bug18133 @@ -0,0 +1,4 @@ + o Minor bugfixes (logging): + - When we can't generate a signing key because OfflineMasterKey is set, + do not imply that we should have been able to load it. + Fixes bug 18133; bugfix on 0.2.7.2-alpha. diff --git a/src/or/routerkeys.c b/src/or/routerkeys.c index d88bfca13a..8006112b16 100644 --- a/src/or/routerkeys.c +++ b/src/or/routerkeys.c @@ -427,6 +427,10 @@ ed_key_init_from_file(const char *fname, uint32_t flags, "but it was encrypted. Try 'tor --keygen' instead, so you " "can enter the passphrase.", secret_fname); + } else if (offline_secret) { + tor_log(severity, LD_OR, "We wanted to load a secret key from %s, " + "but you're keeping it offline. (OfflineMasterKey is set.)", + secret_fname); } else { tor_log(severity, LD_OR, "We needed to load a secret key from %s, " "but couldn't find it. %s", secret_fname, From 4093f343caa576a28269ecdff0c3025f081b058a Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 1 Apr 2016 08:16:21 -0400 Subject: [PATCH 2/2] fix indentation --- src/or/routerkeys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/or/routerkeys.c b/src/or/routerkeys.c index 8006112b16..24ed31f2f6 100644 --- a/src/or/routerkeys.c +++ b/src/or/routerkeys.c @@ -428,7 +428,7 @@ ed_key_init_from_file(const char *fname, uint32_t flags, "can enter the passphrase.", secret_fname); } else if (offline_secret) { - tor_log(severity, LD_OR, "We wanted to load a secret key from %s, " + tor_log(severity, LD_OR, "We wanted to load a secret key from %s, " "but you're keeping it offline. (OfflineMasterKey is set.)", secret_fname); } else {