aboutsummaryrefslogtreecommitdiff
path: root/src/feature
AgeCommit message (Collapse)Author
2020-01-09Allow ed25519 keys to be banned in approved-routersNeel Chauhan
2019-12-10Merge branch 'tor-github/pr/1581'George Kadianakis
2019-12-10hs-v3: Handle client rendezvous circuit timeoutDavid Goulet
With v3, the "pending_final_cpath" of a circuit is always NULL which means that for v3, established client rendezvous circuit waiting for the intro point to ACK, will always end up timing out quickly. This can increase the delays to which you connect to a service since in order to succeed, the rendezvous circuit needs to fully established (CIRCUIT_PURPOSE_C_REND_JOINED) within the cutoff of the introduction circuit as well which is these days around 2-3 seconds. Fixes #32021 Signed-off-by: David Goulet <dgoulet@torproject.org>
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-03hs-v3: Fix NULL deref. in hs_circ_service_get_established_intro_circ()David Goulet
Found by Stem regression tests. Reported by atagar. Fixes #32664 Signed-off-by: David Goulet <dgoulet@torproject.org>
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: Abstract parts of hs_config_client_authorization() into func.George Kadianakis
Now we have a function that reads a file and returns a credential. We need that for the REMOVE control port command.
2019-12-03hsv3: Start refactoring hs_config_client_authorization().George Kadianakis
- Remove key_dir which is useless. - Kill an indentation layer. We want to make it cleaner and slimmer so that we can reuse parts of it in the REMOVE command for removing the right client auth file.
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: Implement permanent storage of auth credentials.George Kadianakis
- See hs_client_register_auth_credentials() for the entry point. - Also set the permanent flag for credentials we read from the filesystem. - Also add some missing documentation.
2019-12-02Merge branch 'tor-github/pr/1559'George Kadianakis
2019-12-01Merge remote-tracking branch 'tor-github/pr/1574'teor
2019-11-29control: Update an outdated function commentteor
Cleanup after 31531.
2019-11-29control: Remove an unused function return valueteor
Cleanup after 31531.
2019-11-29control: Rename a function variableteor
Cleanup after 31531.
2019-11-29control: Remove an unnecessary header in control_events.hteor
And replace it with a struct forward declaration. Also, move all the headers in the file before the forward declaration. Cleanup after 31531.
2019-11-27Merge branch 'tor-github/pr/1573'George Kadianakis
2019-11-27hs-v3: Remove unused hs_service_intro_circ_has_closed()David Goulet
Since the removal of ip->circuit_established, this function does litterally nothing so clean it up. Part of #32020 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-11-27hs-v3: Give a cleanup type to hs_circ_cleanup()David Goulet
By centralizing the circuit cleanup type that is: on close, free and repurpose, some actions on the circuit can not happen for a certain cleanup type or for all types. This passes a cleanup type so the HS subsystem (v2 and v3) can take actions based on the type of cleanup. For instance, there is slow code that we do not run on a circuit close but rather only on free. Part of #32020 Signed-off-by: David Goulet <dgoulet@torproject.org>
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-26Make control_event_conf_changed() take a config_line_tNeel Chauhan
2019-11-25Merge branch 'stream-socks-auth' into bug19859_mergedNick Mathewson
2019-11-23process_descs.c: rename confusing identifiersNick Mathewson
The FP_ identifiers referred to fingerprints, but they also applied to address ranges. The router_status_t name invited confusion with routerstasus_t. Fixes ticket 29826. This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ router_status_t rtr_flags_t \ FP_INVALID RTR_INVALID \ FP_BADEXIT RTR_BADEXIT \ FP_REJECT RTR_REJECT
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-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: Implement ONION_CLIENT_AUTH_VIEW.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-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 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/1544'Nick Mathewson
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 remote-tracking branch 'tor-github/pr/1535'teor