aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2008-04-24 21:29:47 +0000
committerPeter Palfrader <peter@palfrader.org>2008-04-24 21:29:47 +0000
commit4fa1c69c4446aa3f9c0bc86046cd5b9d449da21b (patch)
tree7a6944a280717e79e8d140ce3f0b6acd9bc720eb
parent3185099126e6f39fc59168444f44be011f1fdb83 (diff)
downloadtor-4fa1c69c4446aa3f9c0bc86046cd5b9d449da21b.tar
tor-4fa1c69c4446aa3f9c0bc86046cd5b9d449da21b.tar.gz
Only using v3 authorities and using the proper digest works better
svn:r14455
-rw-r--r--src/or/directory.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index fd2e215df..5b4ad32a4 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -807,9 +807,13 @@ directory_get_consensus_url(int supports_conditional_consensus)
SMARTLIST_FOREACH(router_get_trusted_dir_servers(),
trusted_dir_server_t *, ds,
{
- char *hex = tor_malloc(2*CONDITIONAL_CONSENSUS_FPR_LEN+1);
+ char *hex;
+ if (!(ds->type & V3_AUTHORITY))
+ continue;
+
+ hex = tor_malloc(2*CONDITIONAL_CONSENSUS_FPR_LEN+1);
base16_encode(hex, 2*CONDITIONAL_CONSENSUS_FPR_LEN+1,
- ds->digest, CONDITIONAL_CONSENSUS_FPR_LEN);
+ ds->v3_identity_digest, CONDITIONAL_CONSENSUS_FPR_LEN);
smartlist_add(authority_digets, hex);
});
smartlist_sort(authority_digets, _compare_strs);