Merge remote-tracking branch 'origin/maint-0.2.2'

This commit is contained in:
Nick Mathewson
2011-06-01 11:08:28 -04:00
3 changed files with 15 additions and 13 deletions
+3
View File
@@ -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.
+11 -12
View File
@@ -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)
+1 -1
View File
@@ -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 */