mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-13 06:33:44 +01:00
Merge remote-tracking branch 'public/bug2297'
This commit is contained in:
commit
517b9c602a
6
changes/bug2297-related
Normal file
6
changes/bug2297-related
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
o Minor bugfixes:
|
||||||
|
- Exit nodes don't need to fetch certificates for authorities that
|
||||||
|
they don't recognize; only directory authorities, bridges, and
|
||||||
|
caches need to do that. Fix related to bug 2297; bugfix on
|
||||||
|
0.2.2.11-alpha.
|
||||||
|
|
@ -1252,6 +1252,15 @@ directory_caches_v2_dir_info(const or_options_t *options)
|
|||||||
return options->DirPort != NULL;
|
return options->DirPort != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Return true iff we want to fetch and keep certificates for authorities
|
||||||
|
* that we don't acknowledge as aurthorities ourself.
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
directory_caches_unknown_auth_certs(const or_options_t *options)
|
||||||
|
{
|
||||||
|
return options->DirPort || options->BridgeRelay;
|
||||||
|
}
|
||||||
|
|
||||||
/** Return 1 if we want to keep descriptors, networkstatuses, etc around
|
/** Return 1 if we want to keep descriptors, networkstatuses, etc around
|
||||||
* and we're willing to serve them to others. Else return 0.
|
* and we're willing to serve them to others. Else return 0.
|
||||||
*/
|
*/
|
||||||
|
@ -76,6 +76,7 @@ int directory_fetches_dir_info_early(const or_options_t *options);
|
|||||||
int directory_fetches_dir_info_later(const or_options_t *options);
|
int directory_fetches_dir_info_later(const or_options_t *options);
|
||||||
int directory_caches_v2_dir_info(const or_options_t *options);
|
int directory_caches_v2_dir_info(const or_options_t *options);
|
||||||
#define directory_caches_v1_dir_info(o) directory_caches_v2_dir_info(o)
|
#define directory_caches_v1_dir_info(o) directory_caches_v2_dir_info(o)
|
||||||
|
int directory_caches_unknown_auth_certs(const or_options_t *options);
|
||||||
int directory_caches_dir_info(const or_options_t *options);
|
int directory_caches_dir_info(const or_options_t *options);
|
||||||
int directory_permits_begindir_requests(const or_options_t *options);
|
int directory_permits_begindir_requests(const or_options_t *options);
|
||||||
int directory_permits_controller_requests(const or_options_t *options);
|
int directory_permits_controller_requests(const or_options_t *options);
|
||||||
|
@ -229,7 +229,7 @@ trusted_dirs_load_certs_from_string(const char *contents, int from_store,
|
|||||||
"signing key %s", from_store ? "cached" : "downloaded",
|
"signing key %s", from_store ? "cached" : "downloaded",
|
||||||
ds->nickname, hex_str(cert->signing_key_digest,DIGEST_LEN));
|
ds->nickname, hex_str(cert->signing_key_digest,DIGEST_LEN));
|
||||||
} else {
|
} else {
|
||||||
int adding = directory_caches_dir_info(get_options());
|
int adding = directory_caches_unknown_auth_certs(get_options());
|
||||||
log_info(LD_DIR, "%s %s certificate for unrecognized directory "
|
log_info(LD_DIR, "%s %s certificate for unrecognized directory "
|
||||||
"authority with signing key %s",
|
"authority with signing key %s",
|
||||||
adding ? "Adding" : "Not adding",
|
adding ? "Adding" : "Not adding",
|
||||||
@ -480,7 +480,7 @@ authority_certs_fetch_missing(networkstatus_t *status, time_t now)
|
|||||||
smartlist_t *missing_digests;
|
smartlist_t *missing_digests;
|
||||||
char *resource = NULL;
|
char *resource = NULL;
|
||||||
cert_list_t *cl;
|
cert_list_t *cl;
|
||||||
const int cache = directory_caches_dir_info(get_options());
|
const int cache = directory_caches_unknown_auth_certs(get_options());
|
||||||
|
|
||||||
if (should_delay_dir_fetches(get_options()))
|
if (should_delay_dir_fetches(get_options()))
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user