diff options
author | Nick Mathewson <nickm@torproject.org> | 2021-09-14 15:01:45 -0400 |
---|---|---|
committer | Mike Perry <mikeperry-git@torproject.org> | 2022-02-22 19:28:33 +0000 |
commit | bd2e9a44097ff85934bc1c34f4fce2017a7a92c8 (patch) | |
tree | 90f31985afb3132ff57645be058e5774830941db /src/core/or/extendinfo.c | |
parent | 244444e8b1ac36bf9148aa656e4eb9e293daa5b4 (diff) | |
download | tor-bd2e9a44097ff85934bc1c34f4fce2017a7a92c8.tar.gz tor-bd2e9a44097ff85934bc1c34f4fce2017a7a92c8.zip |
Implement core of ntor3 negotiation.
There are a lot of TODOs about what to send, whom to send it to, and
etc.
Diffstat (limited to 'src/core/or/extendinfo.c')
-rw-r--r-- | src/core/or/extendinfo.c | 12 |
1 files changed, 12 insertions, 0 deletions
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 |