Merge branch 'maint-0.2.4' into release-0.2.4
This commit is contained in:
commit
6837a27025
|
@ -622,7 +622,7 @@ The following options are useful only for clients (that is, if
|
||||||
[[Bridge]] **Bridge** [__transport__] __IP__:__ORPort__ [__fingerprint__]::
|
[[Bridge]] **Bridge** [__transport__] __IP__:__ORPort__ [__fingerprint__]::
|
||||||
When set along with UseBridges, instructs Tor to use the relay at
|
When set along with UseBridges, instructs Tor to use the relay at
|
||||||
"IP:ORPort" as a "bridge" relaying into the Tor network. If "fingerprint"
|
"IP:ORPort" as a "bridge" relaying into the Tor network. If "fingerprint"
|
||||||
is provided (using the same format as for DirServer), we will verify that
|
is provided (using the same format as for DirAuthority), we will verify that
|
||||||
the relay running at that location has the right fingerprint. We also use
|
the relay running at that location has the right fingerprint. We also use
|
||||||
fingerprint to look up the bridge descriptor at the bridge authority, if
|
fingerprint to look up the bridge descriptor at the bridge authority, if
|
||||||
it's provided and if UpdateBridgesFromAuthority is set too. +
|
it's provided and if UpdateBridgesFromAuthority is set too. +
|
||||||
|
@ -2007,7 +2007,8 @@ The following options are used for running a testing Tor network.
|
||||||
[[TestingTorNetwork]] **TestingTorNetwork** **0**|**1**::
|
[[TestingTorNetwork]] **TestingTorNetwork** **0**|**1**::
|
||||||
If set to 1, Tor adjusts default values of the configuration options below,
|
If set to 1, Tor adjusts default values of the configuration options below,
|
||||||
so that it is easier to set up a testing Tor network. May only be set if
|
so that it is easier to set up a testing Tor network. May only be set if
|
||||||
non-default set of DirServers is set. Cannot be unset while Tor is running.
|
non-default set of DirAuthorities is set. Cannot be unset while Tor is
|
||||||
|
running.
|
||||||
(Default: 0) +
|
(Default: 0) +
|
||||||
|
|
||||||
ServerDNSAllowBrokenConfig 1
|
ServerDNSAllowBrokenConfig 1
|
||||||
|
|
|
@ -3182,8 +3182,8 @@ options_validate(or_options_t *old_options, or_options_t *options,
|
||||||
(options->AlternateDirAuthority &&
|
(options->AlternateDirAuthority &&
|
||||||
options->AlternateBridgeAuthority))) {
|
options->AlternateBridgeAuthority))) {
|
||||||
REJECT("TestingTorNetwork may only be configured in combination with "
|
REJECT("TestingTorNetwork may only be configured in combination with "
|
||||||
"a non-default set of DirServer or both of AlternateDirAuthority "
|
"a non-default set of DirAuthority or both of "
|
||||||
"and AlternateBridgeAuthority configured.");
|
"AlternateDirAuthority and AlternateBridgeAuthority configured.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options->AllowSingleHopExits && !options->DirAuthorities) {
|
if (options->AllowSingleHopExits && !options->DirAuthorities) {
|
||||||
|
@ -4567,7 +4567,7 @@ parse_dir_authority_line(const char *line, dirinfo_type_t required_type,
|
||||||
smartlist_split_string(items, line, NULL,
|
smartlist_split_string(items, line, NULL,
|
||||||
SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK, -1);
|
SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK, -1);
|
||||||
if (smartlist_len(items) < 1) {
|
if (smartlist_len(items) < 1) {
|
||||||
log_warn(LD_CONFIG, "No arguments on DirServer line.");
|
log_warn(LD_CONFIG, "No arguments on DirAuthority line.");
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4595,7 +4595,7 @@ parse_dir_authority_line(const char *line, dirinfo_type_t required_type,
|
||||||
char *portstring = flag + strlen("orport=");
|
char *portstring = flag + strlen("orport=");
|
||||||
or_port = (uint16_t) tor_parse_long(portstring, 10, 1, 65535, &ok, NULL);
|
or_port = (uint16_t) tor_parse_long(portstring, 10, 1, 65535, &ok, NULL);
|
||||||
if (!ok)
|
if (!ok)
|
||||||
log_warn(LD_CONFIG, "Invalid orport '%s' on DirServer line.",
|
log_warn(LD_CONFIG, "Invalid orport '%s' on DirAuthority line.",
|
||||||
portstring);
|
portstring);
|
||||||
} else if (!strcmpstart(flag, "weight=")) {
|
} else if (!strcmpstart(flag, "weight=")) {
|
||||||
int ok;
|
int ok;
|
||||||
|
@ -4609,13 +4609,13 @@ parse_dir_authority_line(const char *line, dirinfo_type_t required_type,
|
||||||
char *idstr = flag + strlen("v3ident=");
|
char *idstr = flag + strlen("v3ident=");
|
||||||
if (strlen(idstr) != HEX_DIGEST_LEN ||
|
if (strlen(idstr) != HEX_DIGEST_LEN ||
|
||||||
base16_decode(v3_digest, DIGEST_LEN, idstr, HEX_DIGEST_LEN)<0) {
|
base16_decode(v3_digest, DIGEST_LEN, idstr, HEX_DIGEST_LEN)<0) {
|
||||||
log_warn(LD_CONFIG, "Bad v3 identity digest '%s' on DirServer line",
|
log_warn(LD_CONFIG, "Bad v3 identity digest '%s' on DirAuthority line",
|
||||||
flag);
|
flag);
|
||||||
} else {
|
} else {
|
||||||
type |= V3_DIRINFO|EXTRAINFO_DIRINFO|MICRODESC_DIRINFO;
|
type |= V3_DIRINFO|EXTRAINFO_DIRINFO|MICRODESC_DIRINFO;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
log_warn(LD_CONFIG, "Unrecognized flag '%s' on DirServer line",
|
log_warn(LD_CONFIG, "Unrecognized flag '%s' on DirAuthority line",
|
||||||
flag);
|
flag);
|
||||||
}
|
}
|
||||||
tor_free(flag);
|
tor_free(flag);
|
||||||
|
@ -4627,23 +4627,23 @@ parse_dir_authority_line(const char *line, dirinfo_type_t required_type,
|
||||||
type &= ~V2_DIRINFO;
|
type &= ~V2_DIRINFO;
|
||||||
|
|
||||||
if (smartlist_len(items) < 2) {
|
if (smartlist_len(items) < 2) {
|
||||||
log_warn(LD_CONFIG, "Too few arguments to DirServer line.");
|
log_warn(LD_CONFIG, "Too few arguments to DirAuthority line.");
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
addrport = smartlist_get(items, 0);
|
addrport = smartlist_get(items, 0);
|
||||||
smartlist_del_keeporder(items, 0);
|
smartlist_del_keeporder(items, 0);
|
||||||
if (addr_port_lookup(LOG_WARN, addrport, &address, NULL, &dir_port)<0) {
|
if (addr_port_lookup(LOG_WARN, addrport, &address, NULL, &dir_port)<0) {
|
||||||
log_warn(LD_CONFIG, "Error parsing DirServer address '%s'", addrport);
|
log_warn(LD_CONFIG, "Error parsing DirAuthority address '%s'", addrport);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
if (!dir_port) {
|
if (!dir_port) {
|
||||||
log_warn(LD_CONFIG, "Missing port in DirServer address '%s'",addrport);
|
log_warn(LD_CONFIG, "Missing port in DirAuthority address '%s'",addrport);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
fingerprint = smartlist_join_strings(items, "", 0, NULL);
|
fingerprint = smartlist_join_strings(items, "", 0, NULL);
|
||||||
if (strlen(fingerprint) != HEX_DIGEST_LEN) {
|
if (strlen(fingerprint) != HEX_DIGEST_LEN) {
|
||||||
log_warn(LD_CONFIG, "Key digest '%s' for DirServer is wrong length %d.",
|
log_warn(LD_CONFIG, "Key digest '%s' for DirAuthority is wrong length %d.",
|
||||||
fingerprint, (int)strlen(fingerprint));
|
fingerprint, (int)strlen(fingerprint));
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
@ -4656,7 +4656,7 @@ parse_dir_authority_line(const char *line, dirinfo_type_t required_type,
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
if (base16_decode(digest, DIGEST_LEN, fingerprint, HEX_DIGEST_LEN)<0) {
|
if (base16_decode(digest, DIGEST_LEN, fingerprint, HEX_DIGEST_LEN)<0) {
|
||||||
log_warn(LD_CONFIG, "Unable to decode DirServer key digest.");
|
log_warn(LD_CONFIG, "Unable to decode DirAuthority key digest.");
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -955,14 +955,14 @@ init_keys(void)
|
||||||
}
|
}
|
||||||
if (ds->type != type) {
|
if (ds->type != type) {
|
||||||
log_warn(LD_DIR, "Configured authority type does not match authority "
|
log_warn(LD_DIR, "Configured authority type does not match authority "
|
||||||
"type in DirServer list. Adjusting. (%d v %d)",
|
"type in DirAuthority list. Adjusting. (%d v %d)",
|
||||||
type, ds->type);
|
type, ds->type);
|
||||||
ds->type = type;
|
ds->type = type;
|
||||||
}
|
}
|
||||||
if (v3_digest_set && (ds->type & V3_DIRINFO) &&
|
if (v3_digest_set && (ds->type & V3_DIRINFO) &&
|
||||||
tor_memneq(v3_digest, ds->v3_identity_digest, DIGEST_LEN)) {
|
tor_memneq(v3_digest, ds->v3_identity_digest, DIGEST_LEN)) {
|
||||||
log_warn(LD_DIR, "V3 identity key does not match identity declared in "
|
log_warn(LD_DIR, "V3 identity key does not match identity declared in "
|
||||||
"DirServer line. Adjusting.");
|
"DirAuthority line. Adjusting.");
|
||||||
memcpy(ds->v3_identity_digest, v3_digest, DIGEST_LEN);
|
memcpy(ds->v3_identity_digest, v3_digest, DIGEST_LEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue