diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-08-14 14:30:25 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-08-14 14:30:25 +0000 |
commit | 3399d6317067a1a3a49b300f1c94197f64c580ae (patch) | |
tree | 78060a83414ba578cb3488ee8b278cac5d34cb2a /src/or | |
parent | 817ed1ccbf7423a8b1fe09d26629074c92cd1d3b (diff) | |
download | tor-3399d6317067a1a3a49b300f1c94197f64c580ae.tar tor-3399d6317067a1a3a49b300f1c94197f64c580ae.tar.gz |
r14009@Kushana: nickm | 2007-08-14 10:20:20 -0400
Fix a logic error in certificate handling
svn:r11102
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/routerlist.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index b60989de6..4bdd88fb1 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -182,6 +182,8 @@ router_reload_consensus_networkstatus(void) char filename[512]; char *s; + /* XXXX020 Suppress warnings if cached consensus is bad. */ + tor_snprintf(filename,sizeof(filename),"%s"PATH_SEPARATOR"cached-consensus", get_options()->DataDirectory); s = read_file_to_str(filename, RFTS_IGNORE_MISSING, NULL); @@ -244,9 +246,9 @@ trusted_dirs_load_certs_from_string(const char *contents, int from_store) SMARTLIST_FOREACH(ds->v3_certs, authority_cert_t *, c, { - if (memcmp(c->cache_info.signed_descriptor_digest, - cert->cache_info.signed_descriptor_digest, - DIGEST_LEN)) { + if (!memcmp(c->cache_info.signed_descriptor_digest, + cert->cache_info.signed_descriptor_digest, + DIGEST_LEN)) { /* we already have this one. continue. */ authority_cert_free(cert); found = 1; |