aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-07-01 01:16:59 +0000
committerNick Mathewson <nickm@torproject.org>2004-07-01 01:16:59 +0000
commit541add90a16a2b7b75e5aa3a54071f3a5db00502 (patch)
treee6fbde49f0a12931e102a5211651fd014d06f9b9 /src/or/routerparse.c
parentf42f04c859a68dab45d021dd4197da816ec72b07 (diff)
downloadtor-541add90a16a2b7b75e5aa3a54071f3a5db00502.tar
tor-541add90a16a2b7b75e5aa3a54071f3a5db00502.tar.gz
Track routers by hash of identity key; use hex hash of identity key in place of nickname; accept (and use) hash of identity key in EXTEND cells.
svn:r1994
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r--src/or/routerparse.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 60daf0e33..90657e6fa 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -733,11 +733,14 @@ routerinfo_t *router_parse_entry_from_string(const char *s,
}
if (!(tok = find_first_by_keyword(tokens, K_SIGNING_KEY))) {
- log_fn(LOG_WARN, "Missing onion key"); goto err;
+ log_fn(LOG_WARN, "Missing identity key"); goto err;
}
/* XXX Check key length */
router->identity_pkey = tok->key;
tok->key = NULL; /* Prevent free */
+ if (crypto_pk_get_digest(router->identity_pkey,router->identity_digest)){
+ log_fn(LOG_WARN, "Couldn't calculate key digest"); goto err;
+ }
if ((tok = find_first_by_keyword(tokens, K_PLATFORM))) {
router->platform = tor_strdup(tok->args[0]);