aboutsummaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)Author
2019-12-19Merge branch 'dirauth_config_squashed'Nick Mathewson
2019-12-19Add an integration test for options disabled by dirauth subsystem.Nick Mathewson
2019-12-17Merge branch 'ticket32172_once_again'Nick Mathewson
2019-12-17Merge branch 'tor-github/pr/1608'David Goulet
2019-12-16Compact lines in test_e2e_rend_circuit_setup()Neel Chauhan
2019-12-16Remove extra space from helper_get_circ_and_stream_for_test() call in ↵Neel Chauhan
test_e2e_rend_circuit_setup()
2019-12-16Merge remote-tracking branch 'tor-github/pr/1505'teor
2019-12-12python: Add __future__ imports for python 3 compatibilityteor
Except for src/ext, which we may not want to modify. Closes ticket 32732.
2019-12-10set up tmp dir for test suite to run on AndroidHans-Christoph Steiner
There is no /tmp or mkdtemp on Android, there is /data/local/tmp for root and the shell user. So this fakes mkdtemp. Also, FYI, tor might not like the default perms of /data/local/tmp, e.g. 0770. https://trac.torproject.org/projects/tor/ticket/32172
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-09Rename control_reply_add_1kvTaylor Yu
Part of ticket 30984.
2019-12-08reply lines structuresTaylor Yu
Part of #30984.
2019-12-08add KV_RAW to kvline.cTaylor Yu
Add the KV_RAW flag to kvline_encode(). This allows generation of output that is compatible with some quirks of the control protocol. Part of #30984.
2019-12-08clean up kvline_can_encode_lines()Taylor Yu
Add a check for '=' characters in needs_escape(). This simplifies the logic in kvline_can_encode_lines(). Part of #30984.
2019-12-04Merge branch 'ticket32609_squashed'Nick Mathewson
2019-12-04practracker: Add missing .may_include filesteor
All of these files contain "*.h", except for: * src/app/config/.may_include * src/test/.may_include which also contain "*.inc". This change prevents includes of "*.c" files, and other unusually named files. Part of 32609.
2019-12-04control-port: Include HS address in ONION_CLIENT_AUTH_VIEW reply.George Kadianakis
2019-12-03Merge branch 'tor-github/pr/1563'David Goulet
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-12-03Merge branch 'pr-1569-squashed'teor
2019-12-03Distribute checkSpaceTest.sh and run it when we have perl.Nick Mathewson
2019-11-27Merge branch 'tor-github/pr/1573'George Kadianakis
2019-11-27test: Add unit tests for closing intro circ on failureDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-11-26test/controller: Stop including a ".c" source fileteor
Part of 32522.
2019-11-26test: Fix a python double-spaceteor
2019-11-25Merge branch 'stream-socks-auth' into bug19859_mergedNick Mathewson
2019-11-20Some tests for log changes, commit, and rollbackNick Mathewson
2019-11-20Make KeyDirectory's GroupReadable behave the same as CacheDirectory's.Nick Mathewson
In #26913 we solved a bug where CacheDirectoryGroupReadable would override DataDirectoryGroupReadable when the two directories are the same. We never did the same for KeyDirectory, though, because that's a rare setting. Now that I'm testing this code, though, fixing this issue seems fine. Fixes bug #27992; bugfix on 0.3.3.1-alpha.
2019-11-20New unit tests for options_create_directories().Nick Mathewson
2019-11-20parseconf test: ControlSocketsGroupWriteable without ControlSocket.Nick Mathewson
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-11-18Merge branch 'tor-github/pr/1423'George Kadianakis
2019-11-18test: Unit test for the hs cache decrypt on new authDavid Goulet
Part of #30382 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-11-18test: Unit test for the SOCKS5 HS client auth errorsDavid Goulet
Part of #30382 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-11-18hs-v3: Refactor descriptor dir fetch done codeDavid Goulet
This commit extract most of the code that dirclient.c had to handle the end of a descriptor directory requests (fetch). It is moved into hs_client.c in order to have one single point of entry and the rest is fully handled by the HS subsystem. As part of #30382, depending on how the descriptor ended up stored (decoded or not), different SOCKS error code can be returned. Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-11-18hs-v3: Set extended error if .onion is invalidDavid Goulet
In order to achieve this, the parse_extended_hostname() had to be refactored to return either success or failure and setting the hostname type in the given parameter. The reason for that is so it can detect invalid onion addresses that is having a ".onion", the right length but just not passing validation. That way, we can send back the prop304 ExtendedError "X'F1' Onion Service Descriptor Is Invalid" to notify the SOCKS connection of the invalid onion address. Part of #30382 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-11-18hs-v3: Return descriptor decoding status when storing as clientDavid Goulet
This will allow us to callback into the HS subsytem depending on the decoding status and return an extended SOCKS5 error code depending on the decoding issue. This is how we'll be able to tell the SocksPort connection if we are missing or have bad client authorization for a service. Part of #30382 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-11-18hs-v3: Keep descriptor in cache if client auth is missing or badDavid Goulet
We now keep the descriptor in the cache, obviously not decoded, if it can't be decrypted for which we believe client authorization is missing or unusable (bad). This way, it can be used later once the client authorization are added or updated. Part of #30382 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-11-18Merge remote-tracking branch 'tor-github/pr/1517'teor
2019-11-15Remove the extra whitespace around the DARWIN #definesNeel Chauhan
2019-11-14Fix 32-bit warnings in test_circuitmux.cNick Mathewson
Fixes bug 32496; bug not in any released Tor.
2019-11-14test/parseconf: Warn when the expected_log* file is missingteor
Part of 32451.
2019-11-14test/parseconf: Update conf_examples to use expected_logteor
Part of 32451.
2019-11-14test/parseconf: Add failure cases in conf_failures/teor
These failure cases can be used to test the failure behaviour and failure logs of test_parseconf.sh. See the README for details. Part of 32451.