]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Make node_get_curve25519_onion_key() return a const ptr
authorNick Mathewson <nickm@torproject.org>
Sun, 12 Nov 2017 22:07:16 +0000 (17:07 -0500)
committerNick Mathewson <nickm@torproject.org>
Sun, 12 Nov 2017 22:07:16 +0000 (17:07 -0500)
src/or/nodelist.c
src/or/nodelist.h

index cb324e9b0356cd8a3267aa8acb48707318068231..1ab385cd35b097f8febc4870a0da8601a2cc6a17 100644 (file)
@@ -1640,7 +1640,7 @@ node_has_curve25519_onion_key(const node_t *node)
 }
 
 /** Return the curve25519 key of <b>node</b>, or NULL if none. */
-curve25519_public_key_t *
+const curve25519_public_key_t *
 node_get_curve25519_onion_key(const node_t *node)
 {
   if (node->ri)
index 2922b6e2da735bf2f2f351f81e7f88c2c3dc6350..e879b4e8ff8b032d587805ffd7c2c0d97f9245a3 100644 (file)
@@ -86,7 +86,8 @@ int node_get_prim_dirport(const node_t *node, tor_addr_port_t *ap_out);
 void node_get_pref_dirport(const node_t *node, tor_addr_port_t *ap_out);
 void node_get_pref_ipv6_dirport(const node_t *node, tor_addr_port_t *ap_out);
 int node_has_curve25519_onion_key(const node_t *node);
-curve25519_public_key_t *node_get_curve25519_onion_key(const node_t *node);
+const curve25519_public_key_t *node_get_curve25519_onion_key(
+                                  const node_t *node);
 
 MOCK_DECL(smartlist_t *, nodelist_get_list, (void));