aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-hsclient/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge branch 'mq' into 'main'Ian Jackson2024-10-071-0/+2
|\ | | | | | | | | Implement memory quota tracking See merge request tpo/core/arti!2493
| * memquota: Add a toplevel account in tor-chanmgrIan Jackson2024-10-031-0/+2
| | | | | | | | | | | | | | | | | | Plumb through a top-level account. This doesn't have any channel-specific, circuit-specific or stream-specific accounts yet. tor-circmgr's and tor-hsclient's *tests* need fake account. In arti-relay, use a dummy account for now.
* | Merge branch 'rename-client-auth' into 'main'Ian Jackson2024-10-033-8/+10
|\ \ | |/ |/| | | | | | | | | Use the new "restricted discovery" terminology throughout Closes #1476 See merge request tpo/core/arti!2495
| * tor-hsclient: Use the new "restricted discovery" terminology.Gabriela Moldovan2024-10-033-8/+10
| | | | | | | | Part of #1476
* | CircMgr: Start writing tests.Wesley Aptekar-Cassels2024-10-031-1/+1
|/
* Remove hard tabs in the one file that has them.Ian Jackson2024-10-021-2/+2
|
* Fix a couple of lifetime warnings from nightly.Nick Mathewson2024-10-011-2/+2
| | | | | | | | | Nightly rustdoc, under some circumstances, issues a warning when you have an elided lifetime that matches a lifetime with a name. (It would prefer that you name the lifetime explicitly.) This does not change the actual lifetime of anything; it only makes some formerly elided lifetimes explicit.
* Upgrade to derive_more version 1.0.0Nick Mathewson2024-09-251-1/+1
| | | | | | The `derive_more` crate broke backward compatibility with this version, so this change involved quite a few manual fixups. With luck, they'll keep compatibility for some while in the future.
* Merge branch 'hscircpool-builder-generic' into 'main'gabi-2502024-09-241-9/+11
|\ | | | | | | | | Make `HsCircPool` generic over circuit builder type See merge request tpo/core/arti!2420
| * CircMgr: Make CircMgr and HsCircPool generic over builder type.Wesley Aptekar-Cassels2024-09-241-9/+11
| | | | | | | | | | | | | | | | | | | | This will allow for testing, as the CircuitBuilder can be replaced with a mocked version. This did require moving some of what was in the CircuitBuilder impl into the AbstractCircuitBuilder type, since Drop implementations can't be specialized, but that's fine, as we'll probably be doing more of that in the future anyways.
* | rtcompat: Add an extension trait for building modified RuntimesNick Mathewson2024-09-241-9/+5
|/ | | | | | | With this extension trait, we no longer need to construct `CompoundRuntime` directly outside of tor-rtcompat. This in turn will make it a little less painful when we have to add more generics to CompoundRuntime.
* tor_keymgr: add get_keypair_specifier() to KeySpecifier, and derive itAdam Joseph F0B74D717CDE8412A3E0D4D5F29AC8080DA8E1E02024-09-091-0/+1
| | | | | | | This commit adds a new method `get_keypair_specifier()` to `KeySpecifier`. This method is used to indicate when one KeySpecifier (e.g. `KP_hs_id`) is the public part of another keypair (e.g. `KS_hs_id`). It will return the containing keypair in this case, and `None` otherwise.
* Fix typosDimitris Apostolou2024-09-031-2/+2
|
* extract tor_async_utils::oneshot into ::oneshot-fused-workaroundJim Newsome2024-08-281-1/+1
| | | | | | | | | | | | | | Having this in the `tor-async-utils` crate prevents us from doing both of the following without introducing a circular dependency: * using it in `tor-rtmock` (which we currently do, particularly in tests). * using `tor-rtmock` to test things in `tor-async-utils`. We don't do this yet, but it is generally sensible to do so. In particular we want to move the `stream_peak` module there, which is currently tested with `tor-rtmock`. Moving this into its own crate avoids this circular dependency.
* Re-run maint/add_warning.Nick Mathewson2024-05-061-2/+2
| | | | This commit is automatically generated.
* Switch to derive-deftlyIan Jackson2024-04-031-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the combination of a number of separate commits, many of which were generated by seddery, and then rebased and squashed. Cargo.toml perl -i~ -pe 's{^derive-adhoc}{derive-deftly = "0.10"}' crates/*/Cargo.toml (not regenerated during rebase) update Cargo.lock `cargo fetch` without --locked (regenerated during rebase) seddery git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{^use derive_adhoc}{use derive_deftly}' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bdefine_derive_adhoc\b}{define_derive_deftly}g' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bAdhoc\b}{Deftly}g if m{derive}' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\#\[derive_adhoc\b}{#[derive_deftly}g' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{use derive_adhoc}{use derive_deftly}' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bderive_adhoc\b}{derive_deftly_adhoc} if m{use.*deftly}' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bderive_adhoc!}{derive_deftly_adhoc!}' (not regenerated during rebase) Manually add `#[derive_deftly_adhoc]` where needed. seddery git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\#\[adhoc\b}{#[deftly}g' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bderive_adhoc_template}{derive_deftly_template}' (not regenerated during rebase) Manually fix up an import Manually update some builder attrs Manually fix up tor_rtmock::time_core This was missed in my seddery, due to me rebasing the branch and not redoing the seddery.
* Merge branch 'refactor_stream_crypto_init' into 'main'Nick Mathewson2024-03-261-4/+2
|\ | | | | | | | | Refactor the logic for constructing crypt layers. See merge request tpo/core/arti!2048
| * Refactor the logic for constructing crypt layers.Nick Mathewson2024-03-261-4/+2
| | | | | | | | | | | | | | | | | | | | | | The key insights here are: - That relay cell format and crypto protocols aren't orthogonal: Once we have GCO, it will require V1. - That we only need the actual functions for layer construction to be generic; we don't need to proliferate generic parameters everywhere. - That the circuit::handshake module already does most of what we want.
* | tor-rtcompat: CompoundRuntime: Add a CoarseTimeProvider, and implIan Jackson2024-03-251-0/+1
|/ | | | | | In all the uses in-crate, this is just a RealCoarseTimeProvider. Now all the compound runtimes impl CoarseTimeProvider.
* Propagate RelayCellFormat selection up to where format decisions will be madeJim Newsome2024-03-201-2/+4
|
* hsclient: Clarify "hs_hops" to avoid confusion.Nick Mathewson2024-03-141-6/+11
| | | | | | | With the new structure here, it's less likely that somebody will think this is the length of a circuit that we are building. See #1332 for an instance of what we're trying to prevent.
* Run maint/add_warning.Nick Mathewson2024-03-133-0/+3
|
* tor-circmgr: Create the VanguardMgr in CircMgr::new.Gabriela Moldovan2024-03-111-5/+0
|
* tor-circmgr: Give CircMgr a VanguardMgr.Gabriela Moldovan2024-03-111-0/+6
| | | | Closes #1277
* deny clippy::unchecked_duration_subtractiontrinity-1686a2024-02-291-0/+1
|
* tor-circmgr: Add UniqId to CircTimeout.Gabriela Moldovan2024-02-271-1/+1
| | | | Part of #1297
* tor-hsclient: Remove client nickname from the client key specifiers (fmt).Gabriela Moldovan2024-02-222-7/+2
|
* tor-hsclient: Remove client nickname from the client key specifiers.Gabriela Moldovan2024-02-222-35/+2
| | | | Closes #1283
* tor-hsclient: Rename HsClientSpecifier to HsClientNickname (fmt).Gabriela Moldovan2024-01-311-2/+2
|
* tor-hsclient: Rename HsClientSpecifier to HsClientNickname.Gabriela Moldovan2024-01-312-11/+9
| | | | | Service nicknames are represented by `HsNickname`, so let's rename `HsClientSpecifier` to `HsClientNickname`.
* tor-persist: Make all Slugs non-empty.Gabriela Moldovan2024-01-311-2/+0
| | | | | | | | This also removes a TODO regarding adding a `Nickname` type for representing `HsClientSpecifier` and `HsNickname` (we don't need it if `Slug`s are non-empty). Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1931#note_2990227
* tor-keymgr: Abolish ArtiPathComponent.Gabriela Moldovan2024-01-311-1/+1
| | | | | | `ArtiPathComponent`s are really just `Slugs`. Part of #1193, #1092
* tor-hsclient: Use Slug for HsClientSpecifier (fmt).Gabriela Moldovan2024-01-311-11/+3
|
* tor-hsclient: Use Slug for HsClientSpecifier.Gabriela Moldovan2024-01-311-4/+20
|
* tor-netdir: Make hs_dirs_{upload, download} take separate args instead of tuple.Gabriela Moldovan2024-01-241-1/+2
| | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1904#note_2987777
* hsservice: Convert a "TODO" to a ticket about logic duplicationNick Mathewson2024-01-121-0/+3
| | | | New ticket is #1223.
* tor-hsclient: Derive the KeySpecifier implementation (fmt).Gabriela Moldovan2024-01-101-4/+12
|
* tor-hsclient: Derive the KeySpecifier implementation.Gabriela Moldovan2024-01-102-50/+18
| | | | | | | | This addresses a `TODO HSS` about deriving the `KeySpecifier` implementation for client key specifiers. Note that we no longer have a key specifier type for intro auth keys (which are not supported anyway, see #1037).
* hsclient: Remove comment about tearing down circuit.Nick Mathewson2023-12-111-2/+0
| | | | This is now in the spec, with torspec!236.
* Merge branch 'hsclient_parallelism_notes' into 'main'Alexander Færøy2023-12-071-7/+8
|\ | | | | | | | | hsclient: Clean up some TODOs about parallelism. See merge request tpo/core/arti!1795
| * hsclient: Clean up some TODOs about parallelism.Nick Mathewson2023-12-051-7/+8
| | | | | | | | | | | | | | | | * Be a little more specific about what is being parallelized. * Remove TODOs about specs, in favor of torspec#244. * Note some other issues surrounding some of the cases. (See discussions of points 3-6 at #913)
* | tor-keymgr: ArtiPathSyntaxError: rename from ArtiPathError (fmt)Ian Jackson2023-12-071-1/+2
| |
* | tor-keymgr: ArtiPathSyntaxError: rename from ArtiPathErrorIan Jackson2023-12-071-2/+2
|/ | | | | The previous name was ambiguous, and confusable with KeyPathError (of which it is, basically, a variant).
* Merge branch 'report_error_message' into 'main'gabi-2502023-11-301-1/+1
|\ | | | | | | | | Preserve HTTP status text in dirclient errors. See merge request tpo/core/arti!1780
| * Preserve HTTP status text in dirclient errors.Nick Mathewson2023-11-291-1/+1
| | | | | | | | | | | | | | | | The HTTP status text is often useful for diagnosing errors. Tor directory and hsdir caches frequently put useful messages there, especially when rejecting an uploaded document. Inspired by #1142.
* | Convert to the latest versions of dalek-cryptographyNick Mathewson2023-11-291-4/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main changes that we have to adjust for are as follows: * In x25519-dalek: * `StaticSecret` is now behind a feature. * `StaticSecret::new` is deprecated in favor of `StaticSecret::random_from_rng`. * StaticSecret no longer does its own clamping. * In ed25519-dalek: * `SecretKey` has (in effect) been renamed to `SigningKey`. The name `SecretKey` is now an alias for `[u8; 32]`. * `SigningKey` is effectively a keypair, since it contains a public key as well. * `PublicKey` has been renamed to `VerifyingKey`. * The functions to extract a signing key and verifying key have been renamed as you might expect. * `ExpandedSecretKey` has been moved to `hasmat` and no longer implements `sign`. * `ExpanededSecretKey` now has as its elements a scalar and a hash prefix. * Various functions that took `&[u8]` now take `&[u8; N]`. * We no longer need a wrapper for older versions of rand. There is a single test in tor-keymgr that does not pass. I've marked it as ignore for now, in hopes that @gabi-250 can help me figure it out. This closes #808. There are several changes I want to make before we merge, however. They are marked with TODO DALEK.
* tor-hsclient: Deprecate HsClientSecretKeysBuilder::ks_hsc_intro_auth().Gabriela Moldovan2023-11-202-1/+7
|
* tor-hsclient: Add TODO about using the new define_key_specifiers! macro.Gabriela Moldovan2023-10-301-0/+2
|
* hsclient: Rename get_or_launch{connection => circuit}Nick Mathewson2023-10-241-1/+25
| | | | Closes #1078.
* Fix typo in argumentshalcyon2023-10-201-1/+1
|