aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitbuild.c
diff options
context:
space:
mode:
authorNeel Chauhan <neel@neelc.org>2017-11-21 09:16:18 -0500
committerteor <teor2345@gmail.com>2017-11-22 02:20:54 +1100
commit83b8034a98552fd35ce437e968d45583f5a96b69 (patch)
tree03addc67c880ecf510bf957d63f43b49556f134d /src/or/circuitbuild.c
parentb1ab360eca6a1ebd82762d7a735848c25cf19db1 (diff)
downloadtor-83b8034a98552fd35ce437e968d45583f5a96b69.tar.gz
tor-83b8034a98552fd35ce437e968d45583f5a96b69.zip
Introduce node_get_curve25519_onion_key() in extend_info_from_node()
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r--src/or/circuitbuild.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 7f0bcc4150..2e6b63b4d6 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -2707,12 +2707,16 @@ extend_info_from_node(const node_t *node, int for_direct_connect)
node_describe(node));
}
+ /* Retrieve the curve25519 pubkey. */
+ const curve25519_public_key_t *curve_pubkey =
+ node_get_curve25519_onion_key(node);
+
if (valid_addr && node->ri)
return extend_info_new(node->ri->nickname,
node->identity,
ed_pubkey,
node->ri->onion_pkey,
- node->ri->onion_curve25519_pkey,
+ curve_pubkey,
&ap.addr,
ap.port);
else if (valid_addr && node->rs && node->md)
@@ -2720,7 +2724,7 @@ extend_info_from_node(const node_t *node, int for_direct_connect)
node->identity,
ed_pubkey,
node->md->onion_pkey,
- node->md->onion_curve25519_pkey,
+ curve_pubkey,
&ap.addr,
ap.port);
else