mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-01 08:03:31 +01:00
Merge branch 'maint-0.4.0'
This commit is contained in:
commit
0e7b34354a
3
changes/bug29959-040
Normal file
3
changes/bug29959-040
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
o Minor bugfixes (directory authorities):
|
||||||
|
- Actually include the bandwidth-file-digest line in directory authority
|
||||||
|
votes. Fixes bug 29959; bugfix on 0.4.0.2-alpha.
|
@ -320,18 +320,17 @@ format_networkstatus_vote(crypto_pk_t *private_signing_key,
|
|||||||
if (!tor_digest256_is_zero((const char *)v3_ns->bw_file_digest256)) {
|
if (!tor_digest256_is_zero((const char *)v3_ns->bw_file_digest256)) {
|
||||||
/* Encode the digest. */
|
/* Encode the digest. */
|
||||||
char b64_digest_bw_file[BASE64_DIGEST256_LEN+1] = {0};
|
char b64_digest_bw_file[BASE64_DIGEST256_LEN+1] = {0};
|
||||||
if (digest256_to_base64(b64_digest_bw_file,
|
digest256_to_base64(b64_digest_bw_file,
|
||||||
(const char *)v3_ns->bw_file_digest256)>0) {
|
(const char *)v3_ns->bw_file_digest256);
|
||||||
/* "bandwidth-file-digest" 1*(SP algorithm "=" digest) NL */
|
/* "bandwidth-file-digest" 1*(SP algorithm "=" digest) NL */
|
||||||
char *digest_algo_b64_digest_bw_file = NULL;
|
char *digest_algo_b64_digest_bw_file = NULL;
|
||||||
tor_asprintf(&digest_algo_b64_digest_bw_file, "%s=%s",
|
tor_asprintf(&digest_algo_b64_digest_bw_file, "%s=%s",
|
||||||
crypto_digest_algorithm_get_name(DIGEST_ALG_BW_FILE),
|
crypto_digest_algorithm_get_name(DIGEST_ALG_BW_FILE),
|
||||||
b64_digest_bw_file);
|
b64_digest_bw_file);
|
||||||
/* No need for tor_strdup(""), format_line_if_present does it. */
|
/* No need for tor_strdup(""), format_line_if_present does it. */
|
||||||
bw_file_digest = format_line_if_present(
|
bw_file_digest = format_line_if_present(
|
||||||
"bandwidth-file-digest", digest_algo_b64_digest_bw_file);
|
"bandwidth-file-digest", digest_algo_b64_digest_bw_file);
|
||||||
tor_free(digest_algo_b64_digest_bw_file);
|
tor_free(digest_algo_b64_digest_bw_file);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
smartlist_add_asprintf(chunks,
|
smartlist_add_asprintf(chunks,
|
||||||
|
Loading…
Reference in New Issue
Block a user