]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add test for HiddenServiceAuthorizeClient and v3 onion services
authorNeel Chauhan <neel@neelc.org>
Wed, 24 Oct 2018 16:20:10 +0000 (12:20 -0400)
committerDavid Goulet <dgoulet@torproject.org>
Tue, 30 Oct 2018 14:49:03 +0000 (10:49 -0400)
src/test/test_hs_config.c

index 553b96758a085cb78f85663c42e600e0ac1621fd..b6ab0c21f923f27263a6f7b697bcf5ce35060ed8 100644 (file)
@@ -366,6 +366,22 @@ test_invalid_service_v3(void *arg)
     teardown_capture_of_logs();
   }
 
+  /* v2-specific HiddenServiceAuthorizeClient set. */
+  {
+    const char *conf =
+      "HiddenServiceDir /tmp/tor-test-hs-RANDOM/hs1\n"
+      "HiddenServiceVersion 3\n"
+      "HiddenServiceAuthorizeClient stealth client1\n";
+    setup_full_capture_of_logs(LOG_WARN);
+    ret = helper_config_service(conf, validate_only);
+    tt_int_op(ret, OP_EQ, -1);
+    expect_log_msg_containing("Hidden service option "
+                              "HiddenServiceAuthorizeClient is incompatible "
+                              "with version 3 of service in "
+                              "/tmp/tor-test-hs-RANDOM/hs1");
+    teardown_capture_of_logs();
+  }
+
  done:
   ;
 }