summaryrefslogtreecommitdiff
path: root/crates/tor-hsservice/src/req.rs
Commit message (Collapse)AuthorAgeFilesLines
* hsservice: Allow clippy::unused_asyncGabriela Moldovan2026-01-281-0/+1
| | | | | See discussion at https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3613#note_3332767
* Revert "hsservice: Make RendRequest::reject() synchronous"Gabriela Moldovan2026-01-281-1/+1
| | | | | | | | | | This reverts commit 84b31824f317458a2aad6fb021b623935870f5bd. Reverted, as this is a public API that might actually need to become `async` at some point. See discussion at https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3613#note_3332767
* hsservice: Make RendRequest::reject() synchronousGabriela Moldovan2026-01-271-1/+1
|
* keymgr: Remove redundant ArtiPath from error context (fmt)Gabriela Moldovan2026-01-061-4/+2
|
* keymgr: Remove redundant ArtiPath from error contextGabriela Moldovan2026-01-061-5/+3
| | | | | The `ArtiPath` is included in the `KeyPathError::Arti` outer error type, so there is no need to include it in `ArtiPathError` too.
* keymgr: Split out ArtiPathError from KeyPathError (fmt)Gabriela Moldovan2026-01-061-16/+19
|
* keymgr: Split out ArtiPathError from KeyPathErrorGabriela Moldovan2026-01-061-7/+12
| | | | | This makes the error handling around `KeyPath`s a bit more sensible, IMO, and it will make it easier to extend it for `CTorPath` errors.
* tor-hsservice: Modified MSRV TODO for `once_cell` removalhashcatHitman2025-08-201-7/+1
| | | | | | | | | - Shortened the TODO added in cad6f9054a5ff4d16e953fd4617d3893639deeef in the style of [this maintainer request] for consistency. [this maintainer request]: https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2953#note_3197719 Signed-off-by: hashcatHitman <[email protected]>
* proto: Move the `stream` module under `client` (breaking).Gabriela Moldovan2025-08-181-1/+1
| | | | | | | | | | | | The `stream` module is client-specific, for the most part, so I am moving it under `client`. Later on, we will factor out the parts that can be shared with the relay implementation. Note: this is a breaking change as the deleted `stream` module was `pub`. We could've kept the module and reexported from it the public types from `tor_proto::client::stream`, but I think it's better to have this `client` namespacing, because it makes the separation between the client and relay parts clearer.
* hsservice: copy our TODO about eventually replacing once_cell.Nick Mathewson2025-08-051-0/+8
|
* hs: Use the new Tunnel interface for onion serviceDavid Goulet2025-08-051-4/+7
|
* Add methods for getting proof-of-work extension from intro request.Wesley Aptekar-Cassels2025-05-271-1/+1
|
* tor-keymgr: Rename KeyPathRange to ArtiPathRange.Gabriela Moldovan2024-10-081-1/+1
| | | | | This is only used for representing portions of `ArtiPath`s, so let's rename it accordingly.
* tor-keymgr: Implement KeyPath::matches for CTorPaths.Gabriela Moldovan2024-10-081-8/+6
| | | | | | | `KeyPath::matches` now returns a boolean (because we can't return a matching "range" for `CTorPaths`, because unlike ArtiPaths, they're not represented as `String`s, and do not have variable parts that need to be captured).
* tor_hsservice use get::<HsIdKey> rather than get::<HsIdKeypair>Adam Joseph F0B74D717CDE8412A3E0D4D5F29AC8080DA8E1E02024-09-091-6/+3
| | | | | | | | | | There are three places where we query the KeyMgr for an `HsIdKeypair` but all we really need is the public part. This commit changes those three callsites to instead use `get::<HsIdKey>`. This relies on the previous commit, which makes sure that a request for an `HsIdKey` will always succeed if the keystore has a `HsIdKeypair` with the same service nickname.
* hss: Make the limit for streams configurable.Nick Mathewson2024-03-261-0/+4
| | | | Closes #1124.
* Run rustfmtIan Jackson2024-03-051-6/+2
| | | | | This alphabetises the imports, ready for us to do some more manual tidying.
* tor-hsservice: prelude: Move most imports from req.rsIan Jackson2024-03-051-18/+3
|
* tor-hsservice: Move rend_handshake.rs out of svcIan Jackson2024-03-051-1/+1
|
* tor-keymgr: Include ArtiPath in InvalidArtiPath (fmt).Gabriela Moldovan2024-02-191-2/+6
|
* tor-keymgr: Include ArtiPath in InvalidArtiPath.Gabriela Moldovan2024-02-191-1/+1
| | | | Part of #1115
* tor-keymgr: Include the ArtiPath in InvalidKeyPathComponentValue.Gabriela Moldovan2024-02-191-0/+1
| | | | | | The offending `ArtiPath` should be included in the error. Part of #1115
* tor-keymgr: Rename {to,from}_component to {to,from}_slug.Gabriela Moldovan2024-02-191-3/+3
| | | | | | | | | Originally, these functions converted to and from `ArtiPathComponent`. In !1931, we replaced `ArtiPathComponent` with `Slug` without renaming the conversion functions. Since we're converting to and from `Slug` now, I think it makes sense to rename them too. Part of #1115
* tor-keymgr: Replace KeyMgr::get_with_type with KeyMgr::get_entry.Gabriela Moldovan2024-02-191-2/+1
| | | | Part of #1271
* tor-keymgr: Make KeyMgr::list_matching return `KeystoreEntry`s.Gabriela Moldovan2024-02-191-1/+3
| | | | Part of #1271
* tor-hsservice: Read the keypair when deriving the subcredentials.Gabriela Moldovan2024-02-011-5/+8
| | | | | We're about to stop storing `KP_hs_id` in the keystore, so in preparation, let's update the callsites that attempt to retrieve it.
* tor-keymgr: Remove the Slug tests (fmt).Gabriela Moldovan2024-01-311-4/+2
|
* tor-keymgr: Abolish ArtiPathComponent.Gabriela Moldovan2024-01-311-3/+4
| | | | | | `ArtiPathComponent`s are really just `Slugs`. Part of #1193, #1092
* tor-hsservice: Move compute_subcredentials to RendRequestContext.Gabriela Moldovan2024-01-221-4/+95
| | | | Part of #1242
* tor-hsservice: Do not store the subcredentials in RendRequestContext.Gabriela Moldovan2024-01-221-9/+9
| | | | | | | | | | | | | | | Previously, the subcredentials were computed in `IptEstablisher::launch` and stored in `RendRequestContext`. This caused long-running services to report errors like: ``` WARN tor_hsservice::helpers: Problem while accepting rendezvous request: error: Could not process INTRODUCE request: Introduction handshake was invalid: Circuit-extension handshake authentication failed ``` for clients using newer subcredentials than the ones the service had at the time the IPT was established. Fixes #1242
* hsservice: Document circ lifetime in OpenSession.Nick Mathewson2024-01-171-1/+2
| | | | | Closes #1224, by making it more clear that we aren't keeping a circuit alive indefinitely.
* hsservice: Downgrade TODO HSS comments about adding accessors.Nick Mathewson2024-01-121-2/+2
| | | | We can add these accessors as needed.
* hsservice: Remove unused proof-of-work enumNick Mathewson2024-01-121-14/+0
| | | | When we implement this, we'll use APIs from the equix crate.
* Merge remote-tracking branch 'public/hs_begin'Nick Mathewson2023-11-161-0/+10
|\
| * hss: document behavior needed for indistinguishabilityNick Mathewson2023-10-231-2/+12
| |
* | hsserive::req: Yes, leave these functions as async and fallible.Nick Mathewson2023-10-241-8/+5
| | | | | | | | | | | | | | | | | | | | | | Enough of them have turned out to need to be async so far that I don't think it's a great idea to commit to making any of them not-async forever. Additionally, we've written the code that uses these, and having them be async didn't seem to cause any major trouble. By the same "we may want to make these more complicated underneath" argument, we should IMO leave them as fallible.
* | hsserive::req: Lower/remove allowed warningsNick Mathewson2023-10-241-2/+1
| |
* | hss: Remove an unused type.Nick Mathewson2023-10-241-7/+0
|/
* proto: Make StreamTarget::close() misuse less likely.Nick Mathewson2023-10-171-1/+1
| | | | | | | | | It turns out that we can make `IncomingStream::reject()` consume self, thus making it impossible to hit the double-close error from outside the `tor-proto` crate. Also, we rename `StreamTarget::close()` to `close_pending()` to better reflect its limited applicability.
* tor-hsservice: Narrow some dead code allowsIan Jackson2023-10-161-0/+2
|
* hss: use Arc to avoid copying on k_hss_ntor.Nick Mathewson2023-10-121-1/+1
| | | | (We try to avoid making tons and tons of copies of a secret key.)
* Remove the (fairly bogus) HsNtorServiceInput type.Nick Mathewson2023-10-121-7/+16
| | | | This will let avoid some copying inside our HSS code.
* hss: Remove OnionServiceDataStram type.Nick Mathewson2023-09-271-17/+3
| | | | | | | I think that the reason we added this was in case we needed different behavior from DataStream; but on reflection it does seem that we don't. Having a single type here will make things a bit simpler.
* hss: Implement methodss for StreamRequestNick Mathewson2023-09-271-7/+24
|
* tor-proto: Make allow_stream_requests() not return a ResultNick Mathewson2023-09-271-11/+5
| | | | | | | The function never yields anything but an `Ok`, so we can simplify its type. (Not a stable feature, so no semver entry needed)
* HSS: Enable RendRequests to be answered.Nick Mathewson2023-09-201-17/+55
| | | | | This requires yet more plumbing—this time, of HsCircPool and NetDirProvider.
* HSS: route most necessary key material to RendRequestNick Mathewson2023-09-201-8/+24
| | | | | | | | | When we go to answer a RendRequest, we need to have a few objects present. This commit makes sure that they're available at the right places. We also note a significant problem with the need for a Subcredential here.
* tor-hsservice: Apply deferred rustfmt churnIan Jackson2023-09-181-5/+1
|
* tor-hsservice: Unify ids as IptLocalId replacing IntroPointIdIan Jackson2023-09-181-4/+5
| | | | | | | | | | | | | | | | | | | | IntroPointId was RelayIds but that's wrong, because there can be different IPTs at the same relay - but also because an established IPT might change its RelayIds. Use IptLocalId instead, which I think is the type we decided to use for this, and which is, conveniently, Copy. And change the variable names to match, everywhere. Specifically: in places where an intro point is implied (ipt_mgr.rs, ipt_establish.rs) use the name `lid` everywhere, like in ipt_mgr.rs. Elsewhere, use `ipt_lid`. (We could use a longer name, but in that case it should be changed in ipt_mgr.rs too.) No actual functional change in this commit.
* HSS: Refactor RendRequest so we can return a stream of it.Nick Mathewson2023-08-221-29/+44
| | | | | | | We need a type that holds a rend_handshake::IntroRequest object internally, but where we don't materialize that object from the Introduce2 message inside the MsgHandler, since that's more crypto than we want to put in that task.