aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2019-11-27hs-v3: Note client intro circuit failureDavid Goulet
Report back to the v3 subsystem any introduction point client circuit failure so they can be noted down in the failure cache. Fixes #32020 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-11-27hs-v2: Modernize rend_client_circuit_cleanup() codeDavid Goulet
Old and messy code path. Structure it in a more pleasant and readable way. No behavior change with this refactor. Part of #32020 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-11-20hs-v2: Move v2 circuit cleanup actions into hs_circ_cleanup()David Goulet
Refactor to decomplexify circuit_about_to_free() and finally have one single entry point into the HS subsystems (v2 and v3) for when a circuit is freed. With this, hs_circ_cleanup() becomes the one and only entry point when a circuit is freed which then routes to the right subsystem version for any actions to be taken. This moves a big chunk of code from circuituse.c to rendclient.c. No behavior change. Next commit will refactor it to reduce our technical debt. Part of #32020 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-11-20circ: Add hidden service helper functionsDavid Goulet
Functions to correctly identify HS circuit type and version. Part of #32020 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-11-18Rename REGISTER_SUCCESS_ALSO_DECRYPTED to REGISTER_SUCCESS_AND_DECRYPTED.George Kadianakis
2019-11-18Various minor improvements after David's review.George Kadianakis
- Fix a wrong log message - Introduce a cap for the nickname size - Change some 'if' statements to 'switch'.
2019-11-18hs-v3: Decrypt pending descriptors when we get new client auth creds.George Kadianakis
2019-11-18control-port: Tests for ONION_CLIENT_AUTH_VIEW.George Kadianakis
2019-11-18control-port: Implement ONION_CLIENT_AUTH_VIEW.George Kadianakis
2019-11-18control-port: Tests for ONION_CLIENT_AUTH_REMOVE.George Kadianakis
2019-11-18control-port: Implement 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: Improve documentation of hs_cache_client_descriptor_tDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-11-18hs-v3: Function to re-parse unencrypted descriptorDavid Goulet
We now keep descriptor that we can't decode due to missing client authorization in the cache. This new function is used when new client authorization are added and to tell the client cache to retry decoding. 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: Set extended error when missing/bad client authDavid Goulet
Part of #30382 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-11-18hs-v3: Set extended error when descriptor is not foundDavid Goulet
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-16Merge remote-tracking branch 'tor-github/pr/1545'Nick Mathewson
2019-11-16Merge remote-tracking branch 'tor-github/pr/1544'Nick Mathewson
2019-11-16Make structs declared by tor_queues.h macros also follow naming rulesNick Mathewson
2019-11-16map.h: replace maptype with mapname_tNick Mathewson
This change makes our macro bodies consistent with our naming expectations for structs and types outside macro bodies.
2019-11-16handles.h: replace structname with structname_tNick Mathewson
This change makes our macro bodies consistent with our naming expectations for structs and types outside macro bodies.
2019-11-16Revise struct names in examples in comments to end with _tNick Mathewson
2019-11-15Remove the extra whitespace around the DARWIN #definesNeel Chauhan
2019-11-15Remove the extra whitespace in the lines_eq() if statement in ↵Neel Chauhan
consdiff_gen_diff()
2019-11-15Doxygen: rename all .dox files to end with .mdNick Mathewson
Using a standard ending here will let other tools that expect markdown understand our output here. This commit was automatically generated with: for fn in $(find src -name '*.dox'); do \ git mv "$fn" "${fn%.dox}.md"; \ done
2019-11-15Doxygen: remove /** and **/ from all .dox filesNick Mathewson
This is an automatically generated commit, made with: find src -name '*.dox' | \ xargs perl -i -ne 'print unless (m#^\s*/?\*\*/?\s*$#);'
2019-11-15Merge branch 'ticket32211'Nick Mathewson
2019-11-15Initialization documents: incorporate feedback from review.Nick Mathewson
(Thanks, Taylor!)
2019-11-15Merge remote-tracking branch 'tor-github/pr/1535'teor
2019-11-15Merge remote-tracking branch 'tor-github/pr/1533'teor
2019-11-15Merge remote-tracking branch 'tor-github/pr/1536'teor
2019-11-14Avoid redundant typedef of or_options_t and smartlist_t in *_config.hNick Mathewson
Fixes bug 32495.
2019-11-14Fix 32-bit warnings in test_circuitmux.cNick Mathewson
Fixes bug 32496; bug not in any released Tor.
2019-11-14Merge remote-tracking branch 'tor-github/pr/1531'Nick Mathewson
2019-11-14Run "make autostyle"teor
2019-11-14relay: Disable relay_sys when the relay module is disabledteor
Closes ticket 32245.
2019-11-14relay: Disable relay_periodic when the relay module is disabledteor
Closes ticket 32244.
2019-11-14dirauth: Remove a HAVE_MODULE_DIRAUTH inside a functionteor
There are now no HAVE_MODULE_{DIRAUTH,RELAY} inside functions. Closes ticket 32163.
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.