aboutsummaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-01-26 23:18:30 +0000
committerNick Mathewson <nickm@torproject.org>2008-01-26 23:18:30 +0000
commit68cf666d04aebe8bb905bd79dfd61f82fda8731d (patch)
tree99bc35fd3c505276e57c28405b6cfe82bfc9fea2 /src/or/directory.c
parentc7fe633780bffe69d07a1655c6ecbe3c631d5483 (diff)
downloadtor-68cf666d04aebe8bb905bd79dfd61f82fda8731d.tar
tor-68cf666d04aebe8bb905bd79dfd61f82fda8731d.tar.gz
Fix bug 571: associate certificates with keys, not dirservers, so that we can have certificates for dirservers we do not recognize.
svn:r13304
Diffstat (limited to 'src/or/directory.c')
-rw-r--r--src/or/directory.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index 980a65508..c64f290c0 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -601,9 +601,7 @@ connection_dir_download_cert_failed(dir_connection_t *conn, int status)
failed, NULL, 1, 0);
SMARTLIST_FOREACH(failed, char *, cp,
{
- trusted_dir_server_t *dir = trusteddirserver_get_by_v3_auth_digest(cp);
- if (dir)
- download_status_failed(&dir->cert_dl_status, status);
+ authority_cert_dl_failed(cp, status);
tor_free(cp);
});
smartlist_free(failed);
@@ -2494,14 +2492,7 @@ directory_handle_command_get(dir_connection_t *conn, const char *headers,
smartlist_t *certs = smartlist_create();
ssize_t len = -1;
if (!strcmp(url, "/tor/keys/all")) {
- SMARTLIST_FOREACH(router_get_trusted_dir_servers(),
- trusted_dir_server_t *, ds,
- {
- if (!ds->v3_certs)
- continue;
- SMARTLIST_FOREACH(ds->v3_certs, authority_cert_t *, cert,
- smartlist_add(certs, cert));
- });
+ authority_cert_get_all(certs);
} else if (!strcmp(url, "/tor/keys/authority")) {
authority_cert_t *cert = get_my_v3_authority_cert();
if (cert)