diff options
author | David Goulet <dgoulet@torproject.org> | 2017-10-26 14:54:20 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2017-10-26 14:54:20 -0400 |
commit | e598c6f6dee3696df1d0c228268a1bf1b369eb86 (patch) | |
tree | a5a4b21caa66d440d4c92c6c1d87985a341f3e07 /src/or/hs_service.c | |
parent | c4ef21ff5eff26182428d388e0614b4f0c5eed58 (diff) | |
download | tor-e598c6f6dee3696df1d0c228268a1bf1b369eb86.tar.gz tor-e598c6f6dee3696df1d0c228268a1bf1b369eb86.zip |
hs-v3: Check the ed25519 key when picking intro point
If the intro point supports ed25519 link authentication, make sure we don't
have a zeroed key which would lead to a failure to extend to it.
We already check for an empty key if the intro point does not support it so
this makes the check on the key more consistent and symmetric.
Fixes #24002
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/hs_service.c')
-rw-r--r-- | src/or/hs_service.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/hs_service.c b/src/or/hs_service.c index 3d1945aa95..4b67bb4d42 100644 --- a/src/or/hs_service.c +++ b/src/or/hs_service.c @@ -1564,6 +1564,10 @@ pick_intro_point(unsigned int direct_conn, smartlist_t *exclude_nodes) * protocol */ if (!node_supports_ed25519_link_authentication(node)) { tor_assert_nonfatal(ed25519_public_key_is_zero(&info->ed_identity)); + } else { + /* Make sure we *do* have an ed key if we support the link authentication. + * Sending an empty key would result in a failure to extend. */ + tor_assert_nonfatal(!ed25519_public_key_is_zero(&info->ed_identity)); } /* Create our objects and populate them with the node information. */ |