[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [stem] 02/02: Add test case for multiple v3 client auth keys with ADD_ONION
This is an automated email from the git hooks/post-receive script.
atagar pushed a commit to branch master
in repository stem.
commit 24d7c5b896800b6138c2b3fa1b3a7e7a8d066960
Author: nicolaas <nhweideman@xxxxxxxxx>
AuthorDate: Tue May 30 21:22:11 2023 -0700
Add test case for multiple v3 client auth keys with ADD_ONION
---
test/integ/control/controller.py | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/test/integ/control/controller.py b/test/integ/control/controller.py
index 1c9fd366..b149c341 100644
--- a/test/integ/control/controller.py
+++ b/test/integ/control/controller.py
@@ -738,6 +738,29 @@ class TestController(unittest.TestCase):
self.assertEqual(True, await controller.remove_ephemeral_hidden_service(response.service_id))
self.assertEqual([], await controller.list_ephemeral_hidden_services())
+ @test.require.controller
+ @test.require.version(stem.version.Requirement.ONION_SERVICE_AUTH_ADD)
+ @async_test
+ async def test_with_ephemeral_hidden_services_v3_client_auth_multiple_keys(self):
+ """
+ Exercises creating v3 ephemeral hidden services with ClientAuthV3.
+ """
+
+ runner = test.runner.get_runner()
+
+ async with await runner.get_tor_controller() as controller:
+ client_auth_v3_keys = ['FGTORMIDKR7T2PR632HSHLWA4G6HF5TCWSGMHDUU4LWBEFTAVYQQ', 'IIFY5QJBTQDEU5IUBZRQVZV3DBWRKZLDYXSRUP7WYYDKSBPCQVVQ']
+ response = await controller.create_ephemeral_hidden_service(4567, key_content = 'ED25519-V3', client_auth_v3=client_auth_v3_keys)
+ self.assertEqual([response.service_id], await controller.list_ephemeral_hidden_services())
+ self.assertTrue(response.private_key is not None)
+ self.assertEqual('ED25519-V3', response.private_key_type)
+ self.assertEqual({}, response.client_auth)
+
+ # drop the service
+
+ self.assertEqual(True, await controller.remove_ephemeral_hidden_service(response.service_id))
+ self.assertEqual([], await controller.list_ephemeral_hidden_services())
+
@test.require.controller
@test.require.version(stem.version.Requirement.ONION_SERVICE_AUTH_ADD)
@async_test
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits