summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-06-01 11:08:28 -0400
committerNick Mathewson <nickm@torproject.org>2011-06-01 11:08:28 -0400
commita610ebc3a6990261f1cd4ac7c498a3fe8a6c1a53 (patch)
treee823c5350ebf223a32bc3b0ba98b544993fc6b96
parentd0e7c545bacb45921569bf2236cc49d510530af4 (diff)
parent0fd3ad75daf925e8192aa1d44b229b3b7c29829d (diff)
downloadtor-a610ebc3a6990261f1cd4ac7c498a3fe8a6c1a53.tar.gz
tor-a610ebc3a6990261f1cd4ac7c498a3fe8a6c1a53.zip
Merge remote-tracking branch 'origin/maint-0.2.2'
-rw-r--r--changes/bug33183
-rw-r--r--src/or/config.c23
-rw-r--r--src/or/routerparse.c2
3 files changed, 15 insertions, 13 deletions
diff --git a/changes/bug3318 b/changes/bug3318
new file mode 100644
index 0000000000..38991c4b1d
--- /dev/null
+++ b/changes/bug3318
@@ -0,0 +1,3 @@
+ o Minor bugfixes:
+ - Fix a log message that said "bits" while displaying a value in
+ bytes. Fixes bug 3318; bugfix on 0.2.0.1-alpha.
diff --git a/src/or/config.c b/src/or/config.c
index 07053a17ef..988998ed56 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -1202,18 +1202,6 @@ options_act(or_options_t *old_options)
return -1;
}
- /* We want to reinit keys as needed before we do much of anything else:
- keys are important, and other things can depend on them. */
- if (running_tor &&
- (transition_affects_workers ||
- (options->V3AuthoritativeDir && (!old_options ||
- !old_options->V3AuthoritativeDir)))) {
- if (init_keys() < 0) {
- log_warn(LD_BUG,"Error initializing keys; exiting");
- return -1;
- }
- }
-
if (consider_adding_dir_authorities(options, old_options) < 0)
return -1;
@@ -1259,6 +1247,17 @@ options_act(or_options_t *old_options)
finish_daemon(options->DataDirectory);
}
+ /* We want to reinit keys as needed before we do much of anything else:
+ keys are important, and other things can depend on them. */
+ if (transition_affects_workers ||
+ (options->V3AuthoritativeDir && (!old_options ||
+ !old_options->V3AuthoritativeDir))) {
+ if (init_keys() < 0) {
+ log_warn(LD_BUG,"Error initializing keys; exiting");
+ return -1;
+ }
+ }
+
/* Write our PID to the PID file. If we do not have write permissions we
* will log a warning */
if (options->PidFile)
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index d8045aefc6..79ce2b13c0 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -3776,7 +3776,7 @@ token_check_object(memarea_t *area, const char *kwd,
case NEED_SKEY_1024: /* There must be a 1024-bit private key. */
if (tok->key && crypto_pk_keysize(tok->key) != PK_BYTES) {
tor_snprintf(ebuf, sizeof(ebuf), "Wrong size on key for %s: %d bits",
- kwd, (int)crypto_pk_keysize(tok->key));
+ kwd, (int)crypto_pk_keysize(tok->key)*8);
RET_ERR(ebuf);
}
/* fall through */