summaryrefslogtreecommitdiff
path: root/src/test/test_hs_client.c
AgeCommit message (Collapse)Author
2020-04-13Merge branch 'maint-0.4.3'Nick Mathewson
2020-04-13hs-v3: Change all-zeroes hard-assert to a BUG-and-err.George Kadianakis
And also disallow all-zeroes keys from the filesystem; add a test for it too.
2020-04-08test: Unit test for missing ExtendedErrorsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-03-19Merge branch 'tor-github/pr/1792'George Kadianakis
2020-03-19hs-v3: Improve accessor semantic of client cached objectDavid Goulet
Add an inline helper function that indicates if the cached object contains a decrypted descriptor or not. The descriptor object is NULL if tor is unable to decrypt it (lacking client authorization) and some actions need to be done only when we have a decrypted object. This improves code semantic. Fixes #33458 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-24Merge remote-tracking branch 'tor-github/pr/1685/head'Nick Mathewson
2020-02-03hs-v3: Purge ephemeral client auth on NEWNYMDavid Goulet
Fixes #33139. Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-01-21Turn hs_subcredential_t into a proper struct.Nick Mathewson
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-12-20Replace several C identifiers.teor
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ EXPOSE_CLEAN_BACKTRACE BACKTRACE_PRIVATE \ TOR_CHANNEL_INTERNAL_ CHANNEL_OBJECT_PRIVATE \ CHANNEL_PRIVATE_ CHANNEL_FILE_PRIVATE \ EXPOSE_ROUTERDESC_TOKEN_TABLE ROUTERDESC_TOKEN_TABLE_PRIVATE \ SCHEDULER_PRIVATE_ SCHEDULER_PRIVATE
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-11-27test: Add unit tests for closing intro circ on failureDavid Goulet
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: 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-08-23Remove the unused circuit_type field from hs_ident_circuit_t and ↵Neel Chauhan
hs_ident_circuit_new()
2019-06-19hs-v3: Close intro circuits when cleaning client cacheDavid Goulet
Fixes #30921 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-05-10Merge branch 'tor-github/pr/973'George Kadianakis
2019-05-08Merge branch 'tor-github/pr/1000'David Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-05-03Hiding crypt_path_t: Change code to use the privatization macro.George Kadianakis
2019-05-03Revert "Hiding crypt_path_t: Create a constructor for crypt_path_t."George Kadianakis
This reverts commit ab8b80944967ee5a6a0c45dbf61839cf257bfe44.
2019-05-03Hiding crypt_path_t: Trivial changes to satisfy check-local.George Kadianakis
2019-05-03Hiding crypt_path_t: Create a constructor for crypt_path_t.George Kadianakis
We are using an opaque pointer so the structure needs to be allocated on the heap. This means we now need a constructor for crypt_path_t. Also modify all places initializing a crypt_path_t to use the constructor.
2019-05-03Hiding crypt_path_t: Fixup broken unittests.George Kadianakis
2019-04-30Replace all remaining tor_mem_is_zero() with fast_mem_is_zero()Nick Mathewson
2019-04-24test/hs: Correctly convert an IPv6 intro point to an extend_infoteor
Part of #23588.
2019-03-12hs: abolish hs_desc_link_specifier_tteor
The previous commits for 23576 confused hs_desc_link_specifier_t and link_specifier_t. Removing hs_desc_link_specifier_t fixes this confusion. Fixes bug 22781; bugfix on 0.3.2.1-alpha.
2019-01-16Bump copyright date to 2019Nick Mathewson
2018-10-18test: Add test for closing intro circuits when storing a new descriptorDavid Goulet
This is client side and related to 27471 for previous commit that fixes this issue. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-21Split directory.c code into several modulesNick Mathewson
Parts of this C file naturally belong in dircache, dirclient, and dircommon: so, move them there.
2018-09-21Split main.c into main.c and mainloop.cNick Mathewson
The main.c code is responsible for initialization and shutdown; the mainloop.c code is responsible for running the main loop of Tor. Splitting the "generic event loop" part of mainloop.c from the event-loop-specific part is not done as part of this patch.
2018-09-19test: hs-v3 desc has arrived unit testDavid Goulet
That unit test makes sure we don't have pending SOCK request if the descriptor turns out to be unusable. Part of #27410. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-07Merge remote-tracking branch 'dgoulet/ticket20700_035_03'Nick Mathewson
2018-09-07HSv3: Don't assert when reading bad client-side privkeys.George Kadianakis
2018-09-07test: HS v3 client authorization loading secret keySuphanat Chunhapanya
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-07hs-v3: Encrypt the descriptor using a cookieSuphanat Chunhapanya
Previously, we encrypted the descriptor without the descriptor cookie. This commit, when the client auth is enabled, the descriptor cookie is always used. I also removed the code that is used to generate fake auth clients because it will not be used anymore. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-07-11Rename crypto.c to crypto_cipher.c (since that's all it still has.)Nick 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-01Extract more constants from or.hNick Mathewson
2018-07-01Remove needless includes from or.hNick Mathewson
or.h should really include only the minimum of stuff from or/*, common/*, and lib/*.
2018-07-01Combine DH_BYTES and DH_KEY_LEN; put them in a lib/defs header.Nick Mathewson
2018-06-21Rectify include paths (automated)Nick Mathewson
2018-06-20Run rectify_include_paths.pyNick Mathewson
2018-06-20Update copyrights to 2018.Nick Mathewson
2018-06-15Move extend_info_t into its own header.Nick Mathewson
2018-06-15Extract networkstatus_t and ..sr_info_t into their own headersNick Mathewson
2018-06-15Split socks_request_t into its own header.Nick Mathewson
2018-06-15Extract cpath_build_state into its own header.Nick Mathewson
More modules use this than I had expected!