diff options
author | David Goulet <dgoulet@torproject.org> | 2018-07-09 16:11:39 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-08-28 16:01:57 -0400 |
commit | 4976eca8261015dd2a214c4f4722dcdbcfed9c64 (patch) | |
tree | d7d46d07510bbedc1846bf633691ed43ab8bdbb1 /src/test/test_hs.c | |
parent | f8766e887879214297175b0548e3ba4235879df3 (diff) | |
download | tor-4976eca8261015dd2a214c4f4722dcdbcfed9c64.tar.gz tor-4976eca8261015dd2a214c4f4722dcdbcfed9c64.zip |
hs: Render obsolete Tor2web
Remove support for Tor2web in the code and build system. At this commit, tor
doesn't have Tor2web support anymore.
Ref: https://lists.torproject.org/pipermail/tor-dev/2018-July/013295.html
Close #26367
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/test/test_hs.c')
-rw-r--r-- | src/test/test_hs.c | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/src/test/test_hs.c b/src/test/test_hs.c index 135df8e9f3..e3599d5720 100644 --- a/src/test/test_hs.c +++ b/src/test/test_hs.c @@ -354,76 +354,6 @@ test_hs_desc_event(void *arg) tor_free(received_msg); } -/* Make sure we always pick the right RP, given a well formatted - * Tor2webRendezvousPoints value. */ -static void -test_pick_tor2web_rendezvous_node(void *arg) -{ - or_options_t *options = get_options_mutable(); - const node_t *chosen_rp = NULL; - router_crn_flags_t flags = CRN_NEED_DESC; - int retval, i; - const char *tor2web_rendezvous_str = "test003r"; - - (void) arg; - - /* Setup fake routerlist. */ - helper_setup_fake_routerlist(); - - /* Parse Tor2webRendezvousPoints as a routerset. */ - options->Tor2webRendezvousPoints = routerset_new(); - options->UseMicrodescriptors = 0; - retval = routerset_parse(options->Tor2webRendezvousPoints, - tor2web_rendezvous_str, - "test_tor2web_rp"); - tt_int_op(retval, OP_GE, 0); - - /* Pick rendezvous point. Make sure the correct one is - picked. Repeat many times to make sure it works properly. */ - for (i = 0; i < 50 ; i++) { - chosen_rp = pick_tor2web_rendezvous_node(flags, options); - tt_assert(chosen_rp); - tt_str_op(chosen_rp->ri->nickname, OP_EQ, tor2web_rendezvous_str); - } - - done: - routerset_free(options->Tor2webRendezvousPoints); -} - -/* Make sure we never pick an RP if Tor2webRendezvousPoints doesn't - * correspond to an actual node. */ -static void -test_pick_bad_tor2web_rendezvous_node(void *arg) -{ - or_options_t *options = get_options_mutable(); - const node_t *chosen_rp = NULL; - router_crn_flags_t flags = CRN_NEED_DESC; - int retval, i; - const char *tor2web_rendezvous_str = "dummy"; - - (void) arg; - - /* Setup fake routerlist. */ - helper_setup_fake_routerlist(); - - /* Parse Tor2webRendezvousPoints as a routerset. */ - options->Tor2webRendezvousPoints = routerset_new(); - retval = routerset_parse(options->Tor2webRendezvousPoints, - tor2web_rendezvous_str, - "test_tor2web_rp"); - tt_int_op(retval, OP_GE, 0); - - /* Pick rendezvous point. Since Tor2webRendezvousPoints was set to a - dummy value, we shouldn't find any eligible RPs. */ - for (i = 0; i < 50 ; i++) { - chosen_rp = pick_tor2web_rendezvous_node(flags, options); - tt_ptr_op(chosen_rp, OP_EQ, NULL); - } - - done: - routerset_free(options->Tor2webRendezvousPoints); -} - /* Make sure rend_data_t is valid at creation, destruction and when * duplicated. */ static void @@ -1046,11 +976,6 @@ struct testcase_t hs_tests[] = { NULL, NULL }, { "hs_desc_event", test_hs_desc_event, TT_FORK, NULL, NULL }, - { "pick_tor2web_rendezvous_node", test_pick_tor2web_rendezvous_node, TT_FORK, - NULL, NULL }, - { "pick_bad_tor2web_rendezvous_node", - test_pick_bad_tor2web_rendezvous_node, TT_FORK, - NULL, NULL }, { "hs_auth_cookies", test_hs_auth_cookies, TT_FORK, NULL, NULL }, { "single_onion_poisoning_create_dir_none", test_single_onion_poisoning, |