summaryrefslogtreecommitdiff
path: root/src/or/routerlist.c
diff options
context:
space:
mode:
authorteor <teor2345@gmail.com>2016-11-30 11:07:48 +1100
committerteor <teor2345@gmail.com>2016-11-30 11:07:48 +1100
commit65d793fab2bf0a58d00080df8320693cb3a2dbeb (patch)
tree0c02f43af19541607aeb5531ae74e4345f4fc28a /src/or/routerlist.c
parente5c608e535ef9a4c4fe951a277e3891c77de4908 (diff)
downloadtor-65d793fab2bf0a58d00080df8320693cb3a2dbeb.tar.gz
tor-65d793fab2bf0a58d00080df8320693cb3a2dbeb.zip
Fetch unknown certificates if FetchUselessDescriptors is true
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r--src/or/routerlist.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 7508c4b1a6..9d5b74d8b6 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -586,7 +586,7 @@ trusted_dirs_load_certs_from_string(const char *contents, int source,
"signing key %s", from_store ? "cached" : "downloaded",
ds->nickname, hex_str(cert->signing_key_digest,DIGEST_LEN));
} else {
- int adding = directory_caches_unknown_auth_certs(get_options());
+ int adding = we_want_to_fetch_unknown_auth_certs(get_options());
log_info(LD_DIR, "%s %s certificate for unrecognized directory "
"authority with signing key %s",
adding ? "Adding" : "Not adding",
@@ -1012,7 +1012,7 @@ authority_certs_fetch_missing(networkstatus_t *status, time_t now,
char *resource = NULL;
cert_list_t *cl;
const or_options_t *options = get_options();
- const int cache = directory_caches_unknown_auth_certs(options);
+ const int keep_unknown = we_want_to_fetch_unknown_auth_certs(options);
fp_pair_t *fp_tmp = NULL;
char id_digest_str[2*DIGEST_LEN+1];
char sk_digest_str[2*DIGEST_LEN+1];
@@ -1084,9 +1084,10 @@ authority_certs_fetch_missing(networkstatus_t *status, time_t now,
if (!smartlist_len(voter->sigs))
continue; /* This authority never signed this consensus, so don't
* go looking for a cert with key digest 0000000000. */
- if (!cache &&
+ if (!keep_unknown &&
!trusteddirserver_get_by_v3_auth_digest(voter->identity_digest))
- continue; /* We are not a cache, and we don't know this authority.*/
+ continue; /* We don't want unknown certs, and we don't know this
+ * authority.*/
/*
* If we don't know *any* cert for this authority, and a download by ID