aboutsummaryrefslogtreecommitdiff
path: root/src/feature/hs/hs_client.c
AgeCommit message (Collapse)Author
2022-03-10Merge branch 'maint-0.4.5' into maint-0.4.6David Goulet
2022-03-10hs: Schedule mainloop event on dirinfo changeDavid Goulet
Due to a possible Guard subsystem recursion, when the HS client gets notified that the directory information has changed, it must run it in a seperate mainloop event to avoid such issue. See the ticket for more information on the recursion. This also fixes a fatal assert. Fixes #40579 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-03-12Update copyrights to 2021, using "make update-copyright"Nick Mathewson
2021-02-19hs: Remove last artefact of HSv2 in the codeDavid Goulet
Closes #40266 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-19hs-v2: Removal of service and relay supportDavid Goulet
This is unfortunately massive but both functionalities were extremely intertwined and it would have required us to actually change the HSv2 code in order to be able to split this into multiple commits. After this commit, there are still artefacts of v2 in the code but there is no more support for service, intro point and HSDir. The v2 support for rendezvous circuit is still available since that code is the same for the v3 and we will leave it in so if a client is able to rendezvous on v2 then it can still transfer traffic. Once the entire network has moved away from v2, we can remove v2 rendezvous point support. Related to #40266 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-19hs-v2: Remove client supportDavid Goulet
Related to #40266 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-27Merge remote-tracking branch 'tor-gitlab/mr/247'George Kadianakis
2021-01-12Merge branch 'ticket40237_044_01' into ticket40237_045_01David Goulet
2021-01-12Merge branch 'ticket40237_043_01' into ticket40237_044_01David Goulet
2021-01-12Merge branch 'ticket40237_035_01' into ticket40237_043_01David Goulet
2021-01-12hs-v3: Require reasonably live consensusDavid Goulet
Some days before this commit, the network experienced a DDoS on the directory authorities that prevented them to generate a consensus for more than 5 hours straight. That in turn entirely disabled onion service v3, client and service side, due to the subsystem requiring a live consensus to function properly. We know require a reasonably live consensus which means that the HSv3 subsystem will to its job for using the best consensus tor can find. If the entire network is using an old consensus, than this should be alright. If the service happens to use a live consensus while a client is not, it should still work because the client will use the current SRV it sees which might be the previous SRV for the service for which it still publish descriptors for. If the service is using an old one and somehow can't get a new one while clients are on a new one, then reachability issues might arise. However, this is a situation we already have at the moment since the service will simply not work if it doesn't have a live consensus while a client has one. Fixes #40237 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-12-24Downgrade the severity of a few rendezvous circuit-related warnings.Neel Chauhan
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-20Merge branch 'maint-0.4.4'George Kadianakis
2020-08-20v3 control: Persist ONION_CLIENT_AUTH_ADD client nameNeel Chauhan
2020-08-11Merge remote-tracking branch 'tor-gitlab/mr/119'Nick Mathewson
2020-08-11Remove a BUG() that could normally trigger in edge-cases.George Kadianakis
2020-07-16Use connection_describe() for log messages.Nick Mathewson
2020-07-09Merge branch 'maint-0.4.4'George Kadianakis
2020-07-09hs-v3: Remove a possible BUG() conditionDavid Goulet
When receiving an introduction NACK, the client either decides to close or re-extend the circuit to another intro point. In order to do this, the service descriptor needs to exists but it is possible that it gets removed from the cache between the establishement of the introduction circuit and the reception of the (N)ACK. For that reason, the BUG(desc == NULL) is removed because it is a possible normal use case. Tor recovers gracefully already. Fixes #34087 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-09Merge branch 'maint-0.4.4'David Goulet
2020-07-09Refactor setup_intro_circ_auth_key() to make it simpler.George Kadianakis
It now uses the 'goto err' pattern, instead of the fatal_unreached() pattern. The latter pattern is usually used when there is a loop, but there is no loop in this function so it can be simplified easily.
2020-07-09Handle a failure edge-case when a client-side intro circ opens.George Kadianakis
2020-07-02Extract extend_info manipulation functions into a new file.Nick Mathewson
2020-06-29Merge remote-tracking branch 'tor-github/pr/1725/head' into maint-0.3.5Nick Mathewson
2020-05-04Merge branch 'maint-0.4.3'Nick Mathewson
2020-04-30Fix a GCC 10.0.1 compilation error.Nick Mathewson
Do not try to stuff "HS_DESC_DECODE_GENERIC_ERROR" (-1) into a socks5_reply_status_t (enum). It doesn't actually make sense, and isn't one of our documented extensions. (This can only happen on a nonfatal assertion that we haven't seen, so it probably isn't happening in practice.) Fixes another case of bug 34077; bugfix on 0.4.3.1-alpha.
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-09hs-v3: Several fixes after #32542 reviewDavid Goulet
asn: Accidentally left this commit out when merging #32542, so cherry-picking it now. Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-04-08fix typos from #32542Roger Dingledine
2020-04-08hs-v3: Report SOCKS ExtendedErrors when all intro timed outDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-04-08hs-v3: Report rendezvous circuit failure SOCKS ExtendedErrorsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-04-08hs-v3: Report introduction failure SOCKS ExtendedErrorsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-03-17Merge branch 'maint-0.4.3'Nick Mathewson
2020-03-17Merge branch 'maint-0.4.2' into maint-0.4.3Nick Mathewson
2020-03-17Merge branch 'maint-0.3.5' into maint-0.4.1Nick Mathewson
2020-03-17Trivial bugfixes found during TROVE investigation.George Kadianakis
2020-02-24Merge remote-tracking branch 'tor-github/pr/1685/head'Nick Mathewson
2020-02-18Fix issues pointed out by Nick.George Kadianakis
- Loose the asserts on num_pkeys. - Straighten some dangling &. - Fix some unpredictable memcpys.
2020-02-12Merge remote-tracking branch 'tor-github/pr/1725' into maint-0.4.3teor
2020-02-12hs-v3: Remove BUG() that can occur normallyDavid Goulet
Fixes #28992 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-11Merge branch 'tor-github/pr/1707'George Kadianakis
2020-02-11hs-v3: Remove BUG() that can occur normallyDavid Goulet
Fixes #28992 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-06hs-v3: Remove descriptor when we remove client authorizationDavid Goulet
When the ONION_CLIENT_AUTH_REMOVE command is given to tor, now also remove the descriptor associated with the client authorization credentials. Fixes #33148 Signed-off-by: David Goulet <dgoulet@torproject.org>
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-10In cancel_descriptor_fetches(), use connection_list_by_type_purpose() ↵Neel Chauhan
instead of connection_list_by_type_state()
2019-12-03Merge branch 'tor-github/pr/1563'David Goulet