mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 22:58:50 +01:00
Introduce node_get_curve25519_onion_key() in extend_info_from_node()
This commit is contained in:
parent
b1ab360eca
commit
83b8034a98
2 changed files with 10 additions and 2 deletions
4
changes/ticket23760
Normal file
4
changes/ticket23760
Normal file
|
@ -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.
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue