diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-09-07 08:35:35 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-09-07 08:35:35 -0400 |
commit | ae7cb3349e8a159c3144e7d3ea66b9a439d7028e (patch) | |
tree | 6aebbb15f4aa8ff2cb815811afe47bbbef194eff /src/or/nodelist.c | |
parent | ab18e5e5fcff7fbdbf0905e6dd2585b7e4a10108 (diff) | |
parent | c527cde82f74849ec3b183159d20441019b77e2e (diff) | |
download | tor-ae7cb3349e8a159c3144e7d3ea66b9a439d7028e.tar.gz tor-ae7cb3349e8a159c3144e7d3ea66b9a439d7028e.zip |
Merge branch 'bug23361_032_01_squashed2'
Diffstat (limited to 'src/or/nodelist.c')
-rw-r--r-- | src/or/nodelist.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/or/nodelist.c b/src/or/nodelist.c index 155a511ca1..03b315e682 100644 --- a/src/or/nodelist.c +++ b/src/or/nodelist.c @@ -863,6 +863,28 @@ node_supports_ed25519_hs_intro(const node_t *node) return 0; } +/** Return true iff <b>node</b> supports to be a rendezvous point for hidden + * service version 3 (HSRend=2). */ +int +node_supports_v3_rendezvous_point(const node_t *node) +{ + tor_assert(node); + + if (node->rs) { + return node->rs->supports_v3_rendezvous_point; + } + if (node->ri) { + if (node->ri->protocol_list == NULL) { + return 0; + } + return protocol_list_supports_protocol(node->ri->protocol_list, + PRT_HSREND, + PROTOVER_HS_RENDEZVOUS_POINT_V3); + } + tor_assert_nonfatal_unreached_once(); + return 0; +} + /** Return the RSA ID key's SHA1 digest for the provided node. */ const uint8_t * node_get_rsa_id_digest(const node_t *node) |