aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_hs_control.c
AgeCommit message (Collapse)Author
2020-11-12Fix typos.Samanta Navarro
Typos found with codespell. Please keep in mind that this should have impact on actual code and must be carefully evaluated: src/core/or/lttng_circuit.inc - ctf_enum_value("CONTROLER", CIRCUIT_PURPOSE_CONTROLLER) + ctf_enum_value("CONTROLLER", CIRCUIT_PURPOSE_CONTROLLER)
2020-08-20v3 control: Persist ONION_CLIENT_AUTH_ADD client nameNeel Chauhan
2020-06-22Consistently use 'address' in Invalid v3 address responses to ↵Miguel Jacq
ONION_CLIENT_AUTH commands
2020-04-13hs-v3: Don't allow registration of an all-zeroes client auth key.George Kadianakis
The client auth protocol allows attacker-controlled x25519 private keys being passed around, which allows an attacker to potentially trigger the all-zeroes assert for client_auth_sk in hs_descriptor.c:decrypt_descriptor_cookie(). We fixed that by making sure that an all-zeroes client auth key will not be used. There are no guidelines for validating x25519 private keys, and the assert was there as a sanity check for code flow issues (we don't want to enter that function with an unitialized key if client auth is being used). To avoid such crashes in the future, we also changed the assert to a BUG-and-err.
2020-03-17Split a wide line.Nick Mathewson
2020-03-17Add unittest for TROVE-2020-003.George Kadianakis
This unittest currently fails on purpose (to demonstrate the bug) but it will stop failing after the next commit (the bugfix).
2020-02-06test: Missing hs_init() in some hs_control testsDavid Goulet
Without the hs_init(), the caches are not initialized and the previous commit was causing an assert due to the missing caches. But regardless of that, those tests were not initializing but were calling hs_free_all(). Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-12-20Code Style: Delete headers that are included twiceteor
These changes were created using the "make autostyle" from 32522, and then split into commits.
2019-12-10Merge branch 'tor-github/pr/1583'David Goulet
2019-12-10hs-v3: Fix memory leak in test_hs_control_store_permanent_creds()George Kadianakis
2019-12-04control-port: Include HS address in ONION_CLIENT_AUTH_VIEW reply.George Kadianakis
2019-12-03hsv3: ONION_CLIENT_AUTH_REMOVE now also removes the credential file.George Kadianakis
2019-12-03hsv3: Remove support for client auth nicknames.George Kadianakis
Because the function that parses client auth credentials saved on disk (parse_auth_file_content()) is not future compatible, there is no way to add support for storing the nickname on the disk. Hence, nicknames cannot persist after Tor restart making them pretty much useless. In the future we can introduce nicknames by adding a new file format for client auth credentials, but this was not deemed worth doing at this stage.
2019-12-03hsv3: Add tests for permanently storing auth credentials.George Kadianakis
Remove Permanent flag from old tests, and make a new test that does all the permanent things.
2019-11-18control-port: Tests for ONION_CLIENT_AUTH_VIEW.George Kadianakis
2019-11-18control-port: Tests for ONION_CLIENT_AUTH_REMOVE.George Kadianakis
2019-11-18control-port: Tests for ONION_CLIENT_AUTH_ADD.George Kadianakis
2019-11-18control-port: Implement ONION_CLIENT_AUTH_ADD.George Kadianakis
2019-04-05crypto_format: Remove the return values from digest256_to_base64()teor
... and ed25519_public_to_base64(). Also remove all checks for the return values, which were redundant anyway, because the functions never failed. Part of 29960.
2019-03-25Minimize the includes in control.cNick Mathewson
2019-03-25Split all controller events code into a new control_events.cNick Mathewson
Also, split the formatting code shared by control.c and control_events.c into controller_fmt.c.
2019-01-16Bump copyright date to 2019Nick Mathewson
2018-07-05Fix every include path changed in the previous commit (automated)Nick Mathewson
I am very glad to have written this script.
2018-07-01Minimize headers that include crypto_formats and x25519 stuffNick Mathewson
2018-06-20Run rectify_include_paths.pyNick Mathewson
2018-06-20Update copyrights to 2018.Nick Mathewson
2018-06-15Extract routerstatus_t into its own header.Nick Mathewson
2018-06-15Extract node_t into its own header.Nick Mathewson
2018-04-28Make hsdir_index in node_t a hsdir_index_t rather than a pointer.Neel Chauhan
2017-12-05test: Add HS_DESC v3 unit testsDavid Goulet
This introduces the test_hs_control.c file which at this commit contains basic unit test for the HS_DESC event. Signed-off-by: David Goulet <dgoulet@torproject.org>