Improve warnings for old-style directories.

svn:r2494
This commit is contained in:
Nick Mathewson 2004-10-14 04:31:40 +00:00
parent 100b10473a
commit 55b811a259

View File

@ -622,15 +622,16 @@ static int check_directory_signature(const char *digest,
_pkey = declared_key; _pkey = declared_key;
} }
if (!_pkey) { if (!_pkey) {
log_fn(LOG_WARN, "Processing directory in old (before 0.0.9pre3) format--this may fail.");
r = router_get_by_nickname(tok->args[0]); r = router_get_by_nickname(tok->args[0]);
log_fn(LOG_DEBUG, "Got directory signed by %s", tok->args[0]); log_fn(LOG_DEBUG, "Got directory signed (allegedly) by %s", tok->args[0]);
if (r && r->is_trusted_dir) { if (r && r->is_trusted_dir) {
_pkey = r->identity_pkey; _pkey = r->identity_pkey;
} else if (!r && pkey) { } else if (!r && pkey) {
/* pkey provided for debugging purposes. */ /* pkey provided for debugging purposes. */
_pkey = pkey; _pkey = pkey;
} else if (!r) { } else if (!r) {
log_fn(LOG_WARN, "Directory was signed by unrecognized server %s", log_fn(LOG_WARN, "No server descriptor loaded for signer %s",
tok->args[0]); tok->args[0]);
return -1; return -1;
} else if (r && !r->is_trusted_dir) { } else if (r && !r->is_trusted_dir) {