summaryrefslogtreecommitdiff
path: root/src/or/dirvote.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-10-10 19:33:11 +0000
committerNick Mathewson <nickm@torproject.org>2007-10-10 19:33:11 +0000
commitb5301d81dbcc210b8e96c3faed1c004bd9ca8803 (patch)
treefcdb2ce527dfa91b21c48c6817c9ee57940d3fba /src/or/dirvote.c
parentb599d4264faccf631899d586a5386697d12cedc8 (diff)
downloadtor-b5301d81dbcc210b8e96c3faed1c004bd9ca8803.tar.gz
tor-b5301d81dbcc210b8e96c3faed1c004bd9ca8803.zip
r15634@catbus: nickm | 2007-10-10 14:26:49 -0400
Resolve/ignore some XXXXs, and be even more careful about listing a server as a v3 authority. svn:r11839
Diffstat (limited to 'src/or/dirvote.c')
-rw-r--r--src/or/dirvote.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/or/dirvote.c b/src/or/dirvote.c
index 9fa084f61f..ae0ef314ab 100644
--- a/src/or/dirvote.c
+++ b/src/or/dirvote.c
@@ -1310,7 +1310,8 @@ dirvote_clear_votes(int all_votes)
}
}
-/* XXXX020 delete me. */
+/** Return a newly allocated string containing the hex-encoded v3 authority
+ identity digest of every recognized v3 authority. */
static char *
list_v3_auth_ids(void)
{
@@ -1318,9 +1319,10 @@ list_v3_auth_ids(void)
char *keys;
SMARTLIST_FOREACH(router_get_trusted_dir_servers(),
trusted_dir_server_t *, ds,
- if (!tor_digest_is_zero(ds->v3_identity_digest))
- smartlist_add(known_v3_keys,
- tor_strdup(hex_str(ds->v3_identity_digest, DIGEST_LEN))));
+ if ((ds->type & V3_AUTHORITY) &&
+ !tor_digest_is_zero(ds->v3_identity_digest))
+ smartlist_add(known_v3_keys,
+ tor_strdup(hex_str(ds->v3_identity_digest, DIGEST_LEN))));
keys = smartlist_join_strings(known_v3_keys, ", ", 0, NULL);
SMARTLIST_FOREACH(known_v3_keys, char *, cp, tor_free(cp));
smartlist_free(known_v3_keys);
@@ -1610,7 +1612,6 @@ dirvote_add_signatures_to_pending_consensus(
sigs);
if (r >= 0) {
- /* XXXX This should really be its own function. */
char *new_detached =
networkstatus_get_detached_signatures(pending_consensus);
const char *src;