aboutsummaryrefslogtreecommitdiff
path: root/src/feature/nodelist/describe.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-10-15 10:22:49 -0400
committerNick Mathewson <nickm@torproject.org>2020-10-15 10:29:01 -0400
commit5718f38c85a4c1e44465488d458980cac6226a1d (patch)
tree4efdd2ee0cb0d8cd2f31a95289bd6afabe3b0d10 /src/feature/nodelist/describe.h
parent93e7661feff77c642d7c6f38023e8ab3de0d0269 (diff)
downloadtor-5718f38c85a4c1e44465488d458980cac6226a1d.tar.gz
tor-5718f38c85a4c1e44465488d458980cac6226a1d.zip
Add ed25519 identities to relay descriptions.
(Or at least, to all those relay descriptions that derive from format_node_description()). Closes #22668.
Diffstat (limited to 'src/feature/nodelist/describe.h')
-rw-r--r--src/feature/nodelist/describe.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/feature/nodelist/describe.h b/src/feature/nodelist/describe.h
index 62f6c693e2..898b5c943b 100644
--- a/src/feature/nodelist/describe.h
+++ b/src/feature/nodelist/describe.h
@@ -35,22 +35,28 @@ void router_get_verbose_nickname(char *buf, const routerinfo_t *router);
/**
* Longest allowed output of format_node_description, plus 1 character for
* NUL. This allows space for:
- * "$FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF~xxxxxxxxxxxxxxxxxxx at"
+ * "$FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF~xxxxxxxxxxxxxxxxxxx "
+ * "[+++++++++++++++++++++++++++++++++++++++++++] at"
* " 255.255.255.255 and [ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255]"
* plus a terminating NUL.
*/
#define NODE_DESC_BUF_LEN \
- (MAX_VERBOSE_NICKNAME_LEN+4+IPV4_BUF_LEN_NO_NUL+5+TOR_ADDR_BUF_LEN)
+ (MAX_VERBOSE_NICKNAME_LEN+4 \
+ + ED25519_BASE64_LEN+3 \
+ + IPV4_BUF_LEN_NO_NUL+5 \
+ + TOR_ADDR_BUF_LEN)
#endif /* defined(DESCRIBE_PRIVATE) || defined(TOR_UNIT_TESTS) */
#ifdef TOR_UNIT_TESTS
+struct ed25519_public_key_t;
STATIC const char *format_node_description(char *buf,
- const char *id_digest,
- const char *nickname,
- const tor_addr_t *ipv4_addr,
- const tor_addr_t *ipv6_addr);
+ const char *rsa_id_digest,
+ const struct ed25519_public_key_t *ed25519_id,
+ const char *nickname,
+ const tor_addr_t *ipv4_addr,
+ const tor_addr_t *ipv6_addr);
#endif /* defined(TOR_UNIT_TESTS) */