mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 07:07:52 +01:00
Move list of default directory authorities to file scope
This commit is contained in:
parent
e891deb021
commit
42cee727fa
1 changed files with 38 additions and 35 deletions
|
@ -841,15 +841,9 @@ escaped_safe_str(const char *address)
|
||||||
return escaped(address);
|
return escaped(address);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Add the default directory authorities directly into the trusted dir list,
|
/** List of default directory authorities */
|
||||||
* but only add them insofar as they share bits with <b>type</b>.
|
|
||||||
* Each authority's bits are restricted to the bits shared with <b>type</b>.
|
static const char *default_authorities[] = {
|
||||||
* If <b>type</b> is ALL_DIRINFO or NO_DIRINFO (zero), add all authorities. */
|
|
||||||
static void
|
|
||||||
add_default_trusted_dir_authorities(dirinfo_type_t type)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
const char *authorities[] = {
|
|
||||||
"moria1 orport=9101 "
|
"moria1 orport=9101 "
|
||||||
"v3ident=D586D18309DED4CD6D57C18FDB97EFA96D330566 "
|
"v3ident=D586D18309DED4CD6D57C18FDB97EFA96D330566 "
|
||||||
"128.31.0.39:9131 9695 DFC3 5FFE B861 329B 9F1A B04C 4639 7020 CE31",
|
"128.31.0.39:9131 9695 DFC3 5FFE B861 329B 9F1A B04C 4639 7020 CE31",
|
||||||
|
@ -881,10 +875,19 @@ add_default_trusted_dir_authorities(dirinfo_type_t type)
|
||||||
"199.254.238.52:80 74A9 1064 6BCE EFBC D2E8 74FC 1DC9 9743 0F96 8145",
|
"199.254.238.52:80 74A9 1064 6BCE EFBC D2E8 74FC 1DC9 9743 0F96 8145",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
for (i=0; authorities[i]; i++) {
|
|
||||||
if (parse_dir_authority_line(authorities[i], type, 0)<0) {
|
/** Add the default directory authorities directly into the trusted dir list,
|
||||||
|
* but only add them insofar as they share bits with <b>type</b>.
|
||||||
|
* Each authority's bits are restricted to the bits shared with <b>type</b>.
|
||||||
|
* If <b>type</b> is ALL_DIRINFO or NO_DIRINFO (zero), add all authorities. */
|
||||||
|
static void
|
||||||
|
add_default_trusted_dir_authorities(dirinfo_type_t type)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i=0; default_authorities[i]; i++) {
|
||||||
|
if (parse_dir_authority_line(default_authorities[i], type, 0)<0) {
|
||||||
log_err(LD_BUG, "Couldn't parse internal DirAuthority line %s",
|
log_err(LD_BUG, "Couldn't parse internal DirAuthority line %s",
|
||||||
authorities[i]);
|
default_authorities[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue