diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-11-21 13:56:57 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-11-21 13:56:57 -0500 |
commit | 1cc344b277bed85517ddc20b47e697391d58e4cb (patch) | |
tree | e0d54faa01375300b466b5ee213ae978ea975a77 | |
parent | add37440fa34e312900d2cad00967895fe7927a9 (diff) | |
parent | 83b8034a98552fd35ce437e968d45583f5a96b69 (diff) | |
download | tor-1cc344b277bed85517ddc20b47e697391d58e4cb.tar.gz tor-1cc344b277bed85517ddc20b47e697391d58e4cb.zip |
Merge remote-tracking branch 'teor/bug23760_nc'
-rw-r--r-- | changes/ticket23760 | 4 | ||||
-rw-r--r-- | src/or/circuitbuild.c | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/changes/ticket23760 b/changes/ticket23760 new file mode 100644 index 0000000000..9213b14627 --- /dev/null +++ b/changes/ticket23760 @@ -0,0 +1,4 @@ + o Code simplification and refactoring: + - We make extend_info_from_node() use node_get_curve25519_onion_key() + introduced in ticket 23577 to access the curve25519 public keys rather + than accessing it directly. Closes ticket 23760. Patch by Neel Chauhan. 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 |