From bd2e9a44097ff85934bc1c34f4fce2017a7a92c8 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 14 Sep 2021 15:01:45 -0400 Subject: Implement core of ntor3 negotiation. There are a lot of TODOs about what to send, whom to send it to, and etc. --- src/core/or/extendinfo.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/core/or/extendinfo.c') diff --git a/src/core/or/extendinfo.c b/src/core/or/extendinfo.c index 6bcef181be..f33e887e7d 100644 --- a/src/core/or/extendinfo.c +++ b/src/core/or/extendinfo.c @@ -56,6 +56,9 @@ extend_info_new(const char *nickname, if (addr) { extend_info_add_orport(info, addr, port); } + + info->supports_ntor3_and_param_negotiation = false; // TODO: set this. + return info; } @@ -210,6 +213,15 @@ extend_info_supports_ntor(const extend_info_t* ei) CURVE25519_PUBKEY_LEN); } +/** Return true if we can use the Ntor v3 handshake with `ei` */ +int +extend_info_supports_ntor_v3(const extend_info_t *ei) +{ + tor_assert(ei); + return extend_info_supports_ntor(ei) && + ei->supports_ntor3_and_param_negotiation; +} + /* Does ei have an onion key which it would prefer to use? * Currently, we prefer ntor keys*/ int -- cgit v1.2.3-54-g00ecf