aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-10-12 15:55:20 +0000
committerNick Mathewson <nickm@torproject.org>2004-10-12 15:55:20 +0000
commit0068415b800ef78fb75466f5c36544db6686a76a (patch)
tree3672411378a92dd055849337c24743fcc427f5e3 /src/or/routerparse.c
parent43ef5a3e374cef58bb86cdf8b66e660046b01abc (diff)
downloadtor-0068415b800ef78fb75466f5c36544db6686a76a.tar
tor-0068415b800ef78fb75466f5c36544db6686a76a.tar.gz
Add an implementation of trusted_dir_server logic to switch towards simply remembering an addr/port/keyid for each trusted dir server
svn:r2443
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r--src/or/routerparse.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 4ce8684bb..9d999e884 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -577,17 +577,12 @@ static crypto_pk_env_t *find_dir_signing_key(const char *str)
static int dir_signing_key_is_trusted(crypto_pk_env_t *key)
{
char digest[DIGEST_LEN];
- routerinfo_t *r;
if (!key) return 0;
if (crypto_pk_get_digest(key, digest) < 0) {
log_fn(LOG_WARN, "Error computing dir-signing-key digest");
return 0;
}
- if (!(r = router_get_by_digest(digest))) {
- log_fn(LOG_WARN, "No router known with given dir-signing-key digest");
- return 0;
- }
- if (! r->is_trusted_dir) {
+ if(!router_digest_is_trusted_dir(digest)) {
log_fn(LOG_WARN, "Listed dir-signing-key is not trusted");
return 0;
}