summaryrefslogtreecommitdiff
path: root/crates/tor-hsclient/src
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* tor-keymgr: Rename KeyPathError to ArtiPathUnavailableError (fmt).Gabriela Moldovan2023-10-191-2/+5
|
* tor-keymgr: Rename KeyPathError to ArtiPathUnavailableError.Gabriela Moldovan2023-10-191-2/+2
|
* tor-keymgr: Remove From<ArtiPathError> impl for KeyPathError.Gabriela Moldovan2023-10-191-2/+2
|
* tor-hsclient, arti-client: Make BadClientSpecifier wrap an ArtiPathError.Gabriela Moldovan2023-10-191-3/+3
|
* tor-keymgr: Use ArtiPathError for invalid ArtiPaths.Gabriela Moldovan2023-10-191-6/+7
|
* hsclient: add a missing ) to a message.Nick Mathewson2023-10-171-1/+1
|
* dirclient: Seal the Requestable trait and hide most of its members.Nick Mathewson2023-10-171-1/+1
| | | | | | | | Since none of these methods were invoked from outside `tor-dirclient` (except for debugging), and since we have had a fair amount of churn on what we actually want them to be, it seems like a good idea to use this trick to hide them. This will let us make other changes to the actual behavior of Requestable in the future.
* oneshot: Use veneer in tor-hsclientIan Jackson2023-10-111-2/+1
|
* tor-rtmock: Switch MockRuntime to SimpleMockSleepProviderIan Jackson2023-10-031-1/+1
| | | | | | | | | | | | | | | | For now we do this by changing the meaning of the name `MockSleepProvider` in runtime.rs. This is a bodge to reduce noise in this diff. Consequences at call sites: * If the type is named somehow, the other type must be used. * SimpleMockTimeProvider calls it jump_wallclock rather than jump_to, which is IMO a better name. (MockRuntime will change in a moment.) * SimpleMockTimeProvider's advance() function isn't async and doesn't yield. But none of the call sites actually mind that.
* tor-hsclient: Update HsClientSecretKeys docs.Gabriela Moldovan2023-09-251-1/+1
|
* tor-hsclient, arti-client, tor-keymgr, tor-netdoc: Use a keypair instead of ↵Gabriela Moldovan2023-09-252-7/+3
| | | | StaticSecret (fmt).
* tor-hsclient, arti-client, tor-keymgr, tor-netdoc: Use a keypair instead of ↵Gabriela Moldovan2023-09-252-10/+10
| | | | | | | | | | | | | StaticSecret. Previously, when retrieving `KS_hsc_desc_enc` keys (or any other x25519 keys) from the keystore, the keymgr would discard the public part of the key (SSH private keys contain the public part of the key too). Instead of discarding the public key and returning just the `StaticSecret`, the keymgr now returns a `StaticKeypair`. This makes the x25519 `EncodableKey`/`ToEncodableKey` implementation consistent with the ed25519 one (which retrieves key pairs rather than "unescorted" secrets).
* tor-hsclient: state expiry test: Use MockSleepProvider advanceIan Jackson2023-09-201-1/+2
| | | | | See https://gitlab.torproject.org/tpo/core/arti/-/issues/1040
* tor-hsclient: expiry tests: Use advance_byIan Jackson2023-09-181-1/+1
|