summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2018-09-20 08:50:27 -0400
committerDavid Goulet <dgoulet@torproject.org>2018-09-20 08:50:27 -0400
commite3713f17fb393ef701f566dc3a34a188d270a908 (patch)
tree5a7cd8ccd451901ef6910072915629b8cb566ed2 /src
parent119159677be14351ebcae647d3988f4f2fd9eb72 (diff)
downloadtor-e3713f17fb393ef701f566dc3a34a188d270a908.tar.gz
tor-e3713f17fb393ef701f566dc3a34a188d270a908.zip
node: Make node_supports_v3_rendezvous_point() also check for the key
It is not enough to look at protover for v3 rendezvous support but also we need to make sure that the curve25519 onion key is present or in other words that the descriptor has been fetched and does contain it. Fixes #27797. Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src')
-rw-r--r--src/feature/nodelist/nodelist.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/feature/nodelist/nodelist.c b/src/feature/nodelist/nodelist.c
index 50dc8f7d3c..24557a56fb 100644
--- a/src/feature/nodelist/nodelist.c
+++ b/src/feature/nodelist/nodelist.c
@@ -1141,6 +1141,11 @@ node_supports_v3_rendezvous_point(const node_t *node)
{
tor_assert(node);
+ /* We can't use a v3 rendezvous point without the curve25519 onion pk. */
+ if (!node_get_curve25519_onion_key(node)) {
+ return 0;
+ }
+
return node_get_protover_summary_flags(node)->supports_v3_rendezvous_point;
}