summaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-09-11 10:00:11 -0400
committerNick Mathewson <nickm@torproject.org>2017-09-11 10:00:11 -0400
commit3124c921e7af15548b8b16d5f239bfdcd178b2ca (patch)
treebc58c6a9f9b761672ce00d5e19bc5fce3bbe02fa /src/or/dirserv.c
parent362bc880b1c4bbccba8698b872c16fc6a6da168e (diff)
downloadtor-3124c921e7af15548b8b16d5f239bfdcd178b2ca.tar.gz
tor-3124c921e7af15548b8b16d5f239bfdcd178b2ca.zip
Split the behavior of node_supports_ed25519_link_authentication().
Before, this function meant "can we connect to this node and authenticate it using its ed25519 key?" Now it can additionally mean, "when somebody else connects to this node, do we expect that they can authenticate using the node's ed25519 key"? This change lets us future-proof our link authentication a bit. Closes ticket 20895. No backport needed, since ed25519 link authentication support has not been in any LTS release yet, and existing releases with it should be obsolete before any releases without support for linkauth=3 are released.
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r--src/or/dirserv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 06ac15d587..75cd0879aa 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -3284,7 +3284,7 @@ dirserv_orconn_tls_done(const tor_addr_t *addr,
ri = node->ri;
if (get_options()->AuthDirTestEd25519LinkKeys &&
- node_supports_ed25519_link_authentication(node) &&
+ node_supports_ed25519_link_authentication(node, 1) &&
ri->cache_info.signing_key_cert) {
/* We allow the node to have an ed25519 key if we haven't been told one in
* the routerinfo, but if we *HAVE* been told one in the routerinfo, it
@@ -3367,7 +3367,7 @@ dirserv_single_reachability_test(time_t now, routerinfo_t *router)
tor_assert(node);
if (options->AuthDirTestEd25519LinkKeys &&
- node_supports_ed25519_link_authentication(node)) {
+ node_supports_ed25519_link_authentication(node, 1)) {
ed_id_key = &router->cache_info.signing_key_cert->signing_key;
} else {
ed_id_key = NULL;