summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | tor-keymgr: Remove unnecessary trait function.Gabriela Moldovan2023-11-211-7/+0
| | | | | | | | | | | | | | | | We don't use this anymore.
| * | | tor-keymgr: Add a top-level error type (fmt).Gabriela Moldovan2023-11-211-1/+4
| | | |
| * | | tor-keymgr: Add a top-level error type.Gabriela Moldovan2023-11-216-37/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the `tor_keymgr::Error` type was `Box<dyn KeystoreError>`. This forced us to impl `KeystoreError` for any error returned by the keymgr (including those that were not coming from a `Keystore` impl). Now, `tor_keymgr::Error` is an non-exhaustive enum and the `Box<dyn KeystoreError>` opaque error type is only returned from `Keystore` impls The reason we're keeping the `dyn KeystoreError` error type is because it enables `Keystore` implementors to use their own error types. Without it, they would have to choose from our (closed) set of error variants, which may not be suitable for their keystore. See #901.
| * | | tor-keymgr: Add some derives for the dummy KeyType.Gabriela Moldovan2023-11-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are about to add a top-level `tor_keymgr::Error` enum that has a variant that contains a `KeyType`. The error enum needs to be `Clone`, so we need `KeyType` (both the dummy version and the "real" one, because the `err` module is not cfg'd behind the `keymgr` feature) to be `Clone`.
| * | | tor-keymgr: Move ArtiPathError, KeystoreCorruptionError to err.rs.Gabriela Moldovan2023-11-213-54/+53
| | | | | | | | | | | | | | | | | | | | | | | | KeystoreCorruptionError is about to become a variant of the top-level keymgr Error enum (which doesn't exist yet but will be introduced in a future commit).
| * | | tor-keymgr: Inline SshKeyError variants into ArtiNativeKeystoreError.Gabriela Moldovan2023-11-202-43/+34
| | | | | | | | | | | | | | | | An `SshKeyError` *is* an Arti keystore error, so let's unify the two.
* | | | Merge branch 'conditional-content-length' into 'main'Nick Mathewson2023-11-272-19/+16
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Only send Content-Length when needed. See merge request tpo/core/arti!1761
| * | | | Only send Content-Length when needed.Nick Mathewson2023-11-272-19/+16
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to RFC 9110: A user agent SHOULD send Content-Length in a request when the method defines a meaning for enclosed content and it is not sending Transfer-Encoding. For example, a user agent normally sends Content-Length in a POST request even when the value is 0 (indicating empty content). A user agent SHOULD NOT send a Content-Length header field when the request message does not contain content and the method semantics do not anticipate such data. Part of #1024
* | | | Merge branch 'checkeddir_list_and_remove' into 'main'Nick Mathewson2023-11-272-0/+143
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fs-mistrust: Add read_directory and remove_file to CheckedDir. Closes #1117 See merge request tpo/core/arti!1759
| * | | | fs-mistrust: Add read_directory and remove_file to CheckedDir.Nick Mathewson2023-11-272-0/+143
| |/ / / | | | | | | | | | | | | Closes #1117.
* | | | Fix 'target' in doc comment for create_firsthop_ntorJim Newsome2023-11-271-1/+1
| | | |
* | | | Test extend_ntor_v3Jim Newsome2023-11-271-10/+33
| | | |
* | | | Parameterize circuit-extension test by handshake typeJim Newsome2023-11-271-55/+68
| | | |
* | | | Add `ClientCirc::extend_ntor_v3`Jim Newsome2023-11-273-0/+79
| | | |
* | | | tor-proto::circuit::reactor: handle server auxiliary handshake dataJim Newsome2023-11-271-10/+81
| | | |
* | | | Circuit reactor: test ntor-v3 "create"Jim Newsome2023-11-271-43/+101
| | | |
* | | | Add NtorV3SecretKey::generate_for_test and NtorV3SecretKey::newJim Newsome2023-11-271-39/+36
| | | |
* | | | Add PendingClientCirc::create_firsthop_ntor_v3Jim Newsome2023-11-272-0/+44
| | | |
* | | | Add Reactor::create_firsthop_ntor_v3Jim Newsome2023-11-271-0/+50
| | | |
* | | | NtorV3PublicKey: make fields pub(crate), as for NtorPublicKeyJim Newsome2023-11-271-2/+2
| | | |
* | | | Use HandshakeType in Extend2 and CircuitExtender::beginJim Newsome2023-11-274-10/+19
|/ / /
* | | tor-hscrypto: Add a TODO re re-implementation of x25519 keypair genIan Jackson2023-11-231-0/+5
| | | | | | | | | | | | | | | | | | IMO it is quite undesirable to have multiple copies of "gen a secret key and make a keypair out of it". Add a TODO HSS and and a ref to arti#1137 which is related.
* | | tor-hscrypto: Add a docs TODO re the define_pk_keypair macroIan Jackson2023-11-231-0/+3
| | |
* | | tor-hscrypto: derive the impl of Debug for curve25519::StaticKeypairIan Jackson2023-11-232-10/+5
| | |
* | | tor-keymgr: impl ToEncodableKey for IPT keysIan Jackson2023-11-231-1/+25
| | |
* | | tor-hscrypto: Define Keypair conversions for all curve25519 newtypesIan Jackson2023-11-233-9/+18
| |/ |/| | | | | | | | | | | | | | | 1. Move `impl From<SpecificKeypair> for curve25519::StaticKeypair` (which was just a bespoke impl for HsClientDescEncKeypair) into the define_pk_keypair macro, so everything has it. Currently the only other user of the curve25519_pair feature is HsSvcNtorKey. 2. Provide the reverse conversion too.
* | Merge branch 'persist-lock' into 'main'Alexander Færøy2023-11-222-0/+2
|\ \ | | | | | | | | | | | | tor-persist: Make LockStatus #[must_use] See merge request tpo/core/arti!1753
| * | tor-persist: Make LockStatus #[must_use]Ian Jackson2023-11-222-0/+2
| | | | | | | | | | | | | | | I see other problems with this API, see #1136. but we can at least easily do this.
* | | Merge branch 'ratelim-dep' into 'main'Nick Mathewson2023-11-221-1/+1
|\ \ \ | | | | | | | | | | | | | | | | Deps and lockfile: Don't use tor-error and retry-error from crates.io See merge request tpo/core/arti!1752
| * | | Deps and lockfile: Don't use tor-error and retry-error from crates.ioIan Jackson2023-11-211-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | tor-log-ratelim mistakenly had a non-path dependency. Changing this, and running `cargo fetch --offline` to update the lockfile, causes the build to prefer in-tree for many entries in the lockfile.
* | | tor-rtmock: get rid of unwrap()Saksham Mittal2023-11-211-1/+1
| | |
* | | tor-circmgr: panic instead in order to return ErrorSaksham Mittal2023-11-211-1/+1
| | |
* | | tor-rtmock: handle Receiver result inside spawn_join()Saksham Mittal2023-11-212-3/+3
| | |
* | | tor-rtmock: use expect() insteadSaksham Mittal2023-11-211-1/+2
| | |
* | | tor-rtmock: change return types to be less concreteSaksham Mittal2023-11-212-2/+2
| | |
* | | tor-circmgr: port run_builder_test() to use spawn_join()Saksham Mittal2023-11-211-10/+4
| | |
* | | tor-rtmock: change return type of spawn_join()Saksham Mittal2023-11-212-6/+6
| | | | | | | | | | | | | | | This makes it synchronous. The trait bounds on the return type have also been relaxed to not require Clone
* | | tor-rtmock: introduce spawn_join() for MockRuntime & MockExecutorSaksham Mittal2023-11-212-0/+30
|/ / | | | | | | | | | | | | This helps abstract away the need to create a oneshot channel in order to get the return value out of an async function when using MockRuntime. ref: https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1727#note_2965352
* | HSS publisher error: lack of netdir: clarify messagegabi-2502023-11-201-1/+1
| |
* | tor-error: fmt_ending_ok: Permit messages ending in ascii ellipsisIan Jackson2023-11-201-0/+1
| | | | | | | | | | | | | | | | | | Tbis will result in "some message ...: the error" which I think is OK. We don't use a Unicode single-character ellipsis because that character can be hard to read at font sizes which are otherwise OK for text, and because use of non-ascii in logfiles and error messages is unecessary and might cause unnecessary trouble (for example, if the log messages end up going somewhere which isn't 100% valid UTF-8).
* | tor-error: fmt_ending_ok: Implement with a direct matchIan Jackson2023-11-201-1/+5
| | | | | | | | | | Possibly at some point in the past, matching a slice directly wasn't possible. But it is now.
* | Merge branch 'reactor-error-3' into 'main'Ian Jackson2023-11-205-14/+58
|\ \ | |/ |/| | | | | HSS publisher, do some work on ReactorErrors See merge request tpo/core/arti!1724
| * HSS publisher: do not crash reactor if netdir unavailableIan Jackson2023-11-201-7/+19
| | | | | | | | | | | | | | It might come back. This introduces a new bug relating to logging, but it does abolish one of the variants of ReactorError.
| * HSS errors: expose and sort out NetdirProviderShutdown error type (fmt)Ian Jackson2023-11-201-1/+1
| | | | | | | | IHNI why rustfmt wants to do this *now*
| * HSS errors: expose and sort out NetdirProviderShutdown error typeIan Jackson2023-11-204-3/+16
| | | | | | | | | | | | We're going have it in an variant in FatalError. Also make it impl HasKind and have IptError delegate to that.
| * HSS publisher errors: Declare that we want to abolish ReactorErrorIan Jackson2023-11-201-2/+23
| | | | | | | | And explain why this isn't just a question of merging it with FatalError.
| * HSS publisher: Remove a redundant debug messageIan Jackson2023-11-201-2/+0
| | | | | | | | The call to reactor.run() in publish.rs, launch(), calls warn_report.
* | Merge branch 'more-denotators' into 'main'gabi-2502023-11-201-14/+83
|\ \ | |/ |/| | | | | | | | | tor-keymgr: Support encoding more than one denotator in an ArtiPath. Closes #1093 and #1112 See merge request tpo/core/arti!1747
| * tor-keymgr: Update ArtiPath docs.Gabriela Moldovan2023-11-201-5/+9
| |
| * tor-keymgr: Remove now-outdated TODO HSSs.Gabriela Moldovan2023-11-201-6/+0
| |