summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | proto: Make sure that auth tags are truncated to 20 bytesNick Mathewson2023-06-131-3/+13
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Onion service hops (pointlessly) use SHA3-256 for their authentication, but they truncate it to 20 bytes (assuming I'm reading the C right.) See torspec#204 for clarification here.
* | | | Merge branch 'hs' into 'main'gabi-2502023-06-134-45/+155
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | tor-hsclient: Finish(?) plumbing up first cut of HS client connection See merge request tpo/core/arti!1240
| * | | tor-hsclient: Add some more debuggingIan Jackson2023-06-131-2/+39
| | | |
| * | | tor-hsclient: Return the circuitIan Jackson2023-06-131-4/+1
| | | |
| * | | tor-hsclient: Conduct the INTRODUCE1 exchangeIan Jackson2023-06-133-6/+69
| | | |
| * | | tor-hsclient: Remove an already-done TODOIan Jackson2023-06-131-3/+0
| | | | | | | | | | | | | | | | Since !1238 we do pass the handshake_state along.
| * | | tor-cell: IntroduceAck: Add .success() function to give a ResultIan Jackson2023-06-131-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | The type is a bit odd but this is a result of the underlying protocol. I don't feel like inventing `IntroduceAckSuccess` that contains only the extensions.
| * | | tor-hsclient: Rename some errors for greater consistencyIan Jackson2023-06-132-15/+15
| | | |
| * | | tor-hsclient: Reorder timeout errors to be "less interesting"Ian Jackson2023-06-131-21/+21
| | | | | | | | | | | | | | | | | | | | If something *other* than a timeout went wrong, then that is less expected so more interesting.
* | | | Merge branch 'hs3' into 'main'Ian Jackson2023-06-134-73/+177
|\| | | | |/ / |/| | | | | | | | tor-hsclient: Plumb some needed values through etc. See merge request tpo/core/arti!1238
| * | tor-hsclient: Improve proto_oneshot docsNick Mathewson2023-06-131-1/+1
| | |
| * | tor-hsclient: Pass handshake_state to complete_handcshake (fmt)Ian Jackson2023-06-131-1/+4
| | |
| * | tor-hsclient: Pass handshake_state to complete_handcshakeIan Jackson2023-06-131-7/+21
| | | | | | | | | | | | | | | Pass Introduced to complete_handshake. The lack of this was a slip. Add handshake_state to Introduced, and use it.
| * | tor-hsclient: Add a missing docIan Jackson2023-06-131-1/+1
| | | | | | | | | | | | Requested in !1228 but overlooked
| * | tor-hsclient: Introduce proto_oneshot, to help with message handling (fmt)Ian Jackson2023-06-131-12/+5
| | |
| * | tor-hsclient: Introduce proto_oneshot, to help with message handlingIan Jackson2023-06-133-57/+120
| | | | | | | | | | | | | | | This gets rid of a lot of repeated `oneshot::<...<Result, ...>>` and a bit of repeated functional code, etc.
| * | tor-hsclient: (try to) receive the RENDEZVOUS2 messageIan Jackson2023-06-132-7/+38
| | |
| * | tor-hsclient: Fix a botched doc commentIan Jackson2023-06-131-1/+1
| | |
* | | RPC: Suppress a warning to do with RPC and SOCKSIan Jackson2023-06-131-0/+1
|/ / | | | | | | Fixes `cargo check`
* | Merge branch 'msg_in_handler' into 'main'Ian Jackson2023-06-135-31/+49
|\ \ | | | | | | | | | | | | | | | | | | proto: Convert MsgHandler API to expect a message, not a cell. Closes #887 See merge request tpo/core/arti!1236
| * | proto: Convert MsgHandler API to expect a message, not a cell.Nick Mathewson2023-06-125-31/+49
| | | | | | | | | | | | Closes #887.
* | | Merge branch 'rpc_pseudomethods_v6' into 'main'Nick Mathewson2023-06-128-33/+518
|\ \ \ | | | | | | | | | | | | | | | | RPC: Functionality to downcast dyn Object to a dyn Trait. See merge request tpo/core/arti!1225
| * | | RPC: Functionality to downcast dyn Object to a dyn Trait.Nick Mathewson2023-06-126-27/+518
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a rather tricky piece of functionality. It works as follows. We introduce a `CastTable` type. Each `CastTable` tells us how to downcast `dyn Object` for objects of a single concrete type. The `Object` type now has a `get_casttable` method that returns an empty `CastTable` by default. `CastTable` is, internally, a map from the `TypeId` of the target dyn Trait reference type to a function `fn(&dyn Object) -> &dyn Trait`. These functions are stored as `Box<dyn Any + ...>`. (They are Boxed because they may refer to generic functions, which you can't get a static reference to, and they're Any because the functions have different types.) The `decl_object!` macro now implements `get_casttable` as appropriate. (The syntax is a bit janky, but that's what we get for not using derive_adhoc.) For non-generic types, `get_casttable` uses a Lazy<CastTable>`. to initialize a CastTable exactly once. For generic types, it use a `Lazy<RwLock<HashMap<..>>` to build one CastTable per instantiation of the generic type. This could probably be optimized a bit more, the yaks could be shaved in a more scintillating hairstyle, and the syntax for generic `decl_object` could definitely be improved.
| * | | rpc: make decl_object! responsible for writing impl Object {} blocks.Nick Mathewson2023-06-076-9/+3
| | | |
* | | | Merge branch 'desc-validation-err-doc' into 'main'gabi-2502023-06-121-1/+5
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | tor-error: Document another potential cause for OnionServiceDescriptorValidationFailed. See merge request tpo/core/arti!1215
| * | | tor-error: Clarify what we mean by "hostile".Gabriela Moldovan2023-06-121-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Gabriela Moldovan <[email protected]>
| * | | tor-error: Document another potential cause for ↵Gabriela Moldovan2023-06-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | OnionServiceDescriptorValidationFailed. Signed-off-by: Gabriela Moldovan <[email protected]>
* | | | hsclient: fill in a lot more introduce/rendezvous logic.Nick Mathewson2023-06-121-4/+146
| | | | | | | | | | | | | | | | | | | | | | | | This code tries to fill in some TODO HS code, replacing it with a lot more code with a bunch more TODO HS comments. Hopefully the expansions of the new TODO HS comments should be simpler.
* | | | cell: Add an accessor for the body of a Rendezvous2.Nick Mathewson2023-06-121-0/+6
| | | |
* | | | proto: Add a commment about a problem in my hs_ntor plans.Nick Mathewson2023-06-121-0/+4
| | | | | | | | | | | | | | | | | | | | I am pretty sure that C tor works around this somehow; we should figure out how!
* | | | proto: code movement and reindentation in hs_ntorNick Mathewson2023-06-121-86/+75
| | | |
* | | | proto: Remove now-unused hs_ntor APIsNick Mathewson2023-06-121-43/+21
| | | |
* | | | proto: refactor hs_ntor to reuse state.Nick Mathewson2023-06-121-14/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want the ability to send the same handshake request in parallel on multiple introduce circuits. This implies encoding the client handshake more than once. (Sadly we can't _actually_ do this in the protocol as it stands, since the onion service can use a separate KP_hss_ntor for each introduction point; I'll add a comment to that effect later.)
* | | | hsclient: receive rendezvous2 messages too.Nick Mathewson2023-06-121-17/+25
| | | |
* | | | hsclient: Move the body of the msg handler into a new functionNick Mathewson2023-06-121-26/+41
| | | |
* | | | hsclient: Add a second oneshot to Rendezvous msghandlerNick Mathewson2023-06-121-9/+36
| | | | | | | | | | | | | | | | | | | | | | | | On a client's circuit to the rendezvous point, we need to first wait for an `RENDEZVOUS_ESTABLISHED` message, and then for a `RENDEZVOUS2` message.
* | | | hsclient: use hs-client feature in tor-proto.Nick Mathewson2023-06-121-1/+1
| | | |
* | | | Upgrade async-trait requirement to 1.54Nick Mathewson2023-06-129-9/+9
|/ / / | | | | | | | | | | | | | | | | | | | | | We need the fix from [82d69902], which first appeared in async-trait version 1.54. (Technically we only need this fix in tor-hsclient, but we may as well update our minimal async-trait version everywhere.) [82d69902]: https://github.com/dtolnay/async-trait/commit/82d69902535f5cb7f5d9e1ea4168c64abd496389
* | | Merge branch 'redactable_relayids' into 'main'Nick Mathewson2023-06-124-12/+77
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Implement Redactable for RelayIds, and other improvements Closes #882 See merge request tpo/core/arti!1233
| * | | linkspec: cleanup usage; change std::fmt to fmt.Nick Mathewson2023-06-121-6/+6
| | | |
| * | | RelayId: Display the ID type on redacted identities.Nick Mathewson2023-06-092-4/+3
| | | | | | | | | | | | | | | | | | | | Formerly we would display just the first characters of the identity, without telling you what kind of ID it was.
| * | | linkspec: implement Display/Redacted on RelayIdsNick Mathewson2023-06-091-0/+22
| | | |
| * | | linkspec: Implement HasRelayIds::display_relay_ids().Nick Mathewson2023-06-092-6/+50
| | | |
* | | | Merge branch 'circuit_send_message_fixes' into 'main'Nick Mathewson2023-06-122-12/+15
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Correct documentation and API on ClientCirc::send_control_message Closes #885 and #881 See merge request tpo/core/arti!1232
| * | | | Apply 1 suggestion(s) to 1 file(s)Ian Jackson2023-06-121-1/+1
| | | | |
| * | | | proto: Have send_control_message take an AnyRelayMsg.Nick Mathewson2023-06-092-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we break the 1:1 relationship of message and cell, we'll want this API to take messages, not cells. This API is experimental, so we don't need to call it a semver break. Closes #881.
| * | | | proto: Correct the docs on send_control_messageNick Mathewson2023-06-091-2/+7
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Formerly we said that it would not return until the handler was uninstalled. This is incorrect: it returns as soon as the message is sent and the handler installed. Closes #885.
* | | | Merge branch 'arc_hsdirs_in_netdir' into 'main'Ian Jackson2023-06-121-5/+7
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | netdir: Wrap HsDir an Arc<> Closes #883 See merge request tpo/core/arti!1234
| * | | | netdir: Wrap HsDir an Arc<>Nick Mathewson2023-06-091-5/+7
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change reduces the cost of cloning a `NetDir`. It's fine since–although we replace the HsDir once–we never modify it once it exists. Closes #883.
* | | | Merge branch 'pt-snowflake' into 'main'Nick Mathewson2023-06-113-2/+116
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | add documentation for configuring snowflake pt Closes #879 and #875 See merge request tpo/core/arti!1216