summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * hspool: Accept any T:CircTarget.Nick Mathewson2023-05-102-9/+28
| | | | | | | | | | | | Previously, we only accepted an OwnedCircTarget, which would have kept us from getting a circuit that was aimed at a specialized CircTarget that gave us LinkSpecs in a raw order.
| * test_linkspecs: tidy order of linkspecsNick Mathewson2023-05-101-11/+11
| | | | | | | | This is pure code movement.
| * Move responsibility for linkspec sorting to CircTarget.Nick Mathewson2023-05-102-5/+14
| | | | | | | | | | | | This change is necessary so that we can build Extend2 messages that have their LinkSpecs appear in a verbatim order as provided in an INTRODUCE2 message or in a HS descriptor.
* | netdoc: Remove experimental-api gate from parse_decrypt_validate.Gabriela Moldovan2023-05-102-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | `parse_decrypt_validate` was marked as experimental because it was unclear if the newly added `BadTimeBound` error kind belongs in `ParseErrorKind`. However, we have since renamed `ParseErrorKind` to `NetdocErrorKind` and decided to keep the new variant, so this API doesn't need to be experimental anymore. Closes arti #852 Signed-off-by: Gabriela Moldovan <[email protected]>
* | netdoc: Rename `ParseError{Kind, Source}` to `NetdocError{Kind, Source}`.Gabriela Moldovan2023-05-1018-44/+43
|/ | | | | | | | | | | `ParseErrorSource` was originally meant to represent a parsing error, this enum has since gained some variants that aren't really parsing related (`Signature`, `CertSignature`, `UntimelyDescriptor`). Since this error type is now used for general-purpose netdoc errors, let's rename `ParseError{Kind, Source}` to `NetdocError{Kind, Source}`. Signed-off-by: Gabriela Moldovan <[email protected]>
* Merge branch 'ticket_839' into 'main'Alexander Færøy2023-05-091-8/+12
|\ | | | | | | | | | | | | Downgrade and clarify message about dir replacment time. Closes #839 See merge request tpo/core/arti!1171
| * Downgrade and clarify message about dir replacment time.Nick Mathewson2023-05-081-8/+12
| | | | | | | | Closes #839
* | Merge branch 'print-stati-feature' into 'main'Alexander Færøy2023-05-091-2/+2
|\ \ | |/ |/| | | | | print both static sqlite/tls when 'static' feature is used See merge request tpo/core/arti!1169
| * print both static sqlite/tls when 'static' feature is usedtrinity-1686a2023-05-081-2/+2
| |
* | fix a couple clippy lintstrinity-1686a2023-05-082-4/+4
| |
* | update rustls to 0.21trinity-1686a2023-05-082-18/+13
| |
* | update rsa to 0.9.xtrinity-1686a2023-05-082-6/+5
|/
* tor-netdir: Shuffle the list of HS dirs used for downloading descriptors.Gabriela Moldovan2023-05-044-17/+50
| | | | | | | | We'll probably need the hsdir list to be shuffled deterministically for testing purposes (this might be desirable, for example, when we write a test for HS descriptor download retries). Signed-off-by: Gabriela Moldovan <[email protected]>
* objmap: move types to top of file.Nick Mathewson2023-05-041-74/+74
|
* Note/clean more TODOs in objmap.Nick Mathewson2023-05-041-1/+4
|
* RPC: Make the "client" return optional.Nick Mathewson2023-05-041-2/+2
|
* RPC: Make "Weak" and "Strong" entries separate.Nick Mathewson2023-05-041-43/+41
| | | | | | | | | Now there can be one of each, since we want references and handles to be conceptually separate. (The alternative would be to say that an operation either "returns a handle" or "returns a reference (which may become a handle) unless a handle already exists.")
* Temporarily replace generational-arena with a fake version.Nick Mathewson2023-05-042-2/+80
| | | | | This fake version is completely silly, but it will do the job until we figure out our MPL2 concerns.
* RPC: make arti-rpcserver require the arti-client/rpc featureNick Mathewson2023-05-041-1/+1
|
* RPC: Rename session.rs to connection.rsNick Mathewson2023-05-044-4/+4
|
* RPC: rename Session to Connection.Nick Mathewson2023-05-043-45/+48
| | | | | | | To me, "Session" suggests that we're authenticated, when we are not necessarily authenticated. Also, we may eventually want to have some kind of persistent session object; if we do, then we'll want Connections to be separate.
* RPC: Make authentication return a TorClient.Nick Mathewson2023-05-042-58/+66
| | | | | | (This is the correct capabilities-based behavior. For now it will only work if the TorClient uses a PreferredRuntime, but with luck we will find a solution for #837 soon.)
* Add a generational arena for object mapping for RPC.Nick Mathewson2023-05-043-0/+665
| | | | | | See the comments on `TypedAddr` for some explanations about why this is so tricky. Thanks to @diziet for helping me figure this out.
* RPC: Add "register" methods to RequestContext.Nick Mathewson2023-05-043-0/+38
|
* RPC: Start on plumbing TorClient into our RPC codeNick Mathewson2023-05-046-7/+39
| | | | | Because of #837, we won't be able to work with _every_ TorClient<R>, so I'm only going to be using TorClient<PreferredRuntime> for now.
* RPC: Move the "listen" part of the RPC listener code to `arti`.Nick Mathewson2023-05-049-91/+159
| | | | | | | | | Now there's a module in `arti` that runs the loop for an RPC listener. The part of the old `listener` module that made the framed connections is now part of the `Session` object. There is now yet another a temporary location for the pipe; we should pick something better. At least now it's configurable.
* rpc: Make an RpcMgr type to own the DispatchTable.Nick Mathewson2023-05-046-14/+59
| | | | | | | | | In the future, this will probably hold more data as well, like a TorClient and some configuration info. The TorClient will present an issue; I've made comments about that. Closes #820
* tor-error: Add a TODO regarding HS desc parsing errors.Gabriela Moldovan2023-05-031-0/+14
| | | | Signed-off-by: Gabriela Moldovan <[email protected]>
* hscrypto: Add comment about impl that will be removed after we address #798.Gabriela Moldovan2023-05-031-0/+2
| | | | Signed-off-by: Gabriela Moldovan <[email protected]>
* Clarify what the new ErrorKinds mean.Gabriela Moldovan2023-05-031-4/+14
| | | | Signed-off-by: Gabriela Moldovan <[email protected]>
* tor-netdir: Update tests to parse the descriptor, make test consensus ↵Gabriela Moldovan2023-05-035-26/+91
| | | | | | lifetime configurable. Signed-off-by: Gabriela Moldovan <[email protected]>
* hsclient: Use a real HsDesc instead of an unparsed string.Gabriela Moldovan2023-05-034-18/+59
| | | | Signed-off-by: Gabriela Moldovan <[email protected]>
* hscrypto: Add From impl for deriving KP_hsc_desc_enc out of KS_hsc_desc_enc.Gabriela Moldovan2023-05-031-0/+6
| | | | | | | | | | The `HsClientSecretKeys` stored in the HS client connection context only have the secret keys. Certain APIs (such as `HsDesc::parse`) expect a keypair (both `HsClientDescEncKey` and `HsClientDescEncSecretKey`). This `From` impl makes it possible to get a `HsClientDescEncKey` out of `HsClientDescEncSecretKey`. Signed-off-by: Gabriela Moldovan <[email protected]>
* Merge branch 'more_dir_logging' into 'main'Nick Mathewson2023-05-0320-32/+67
|\ | | | | | | | | | | | | Lots more dirmgr log messages Closes #803 See merge request tpo/core/arti!1163
| * Upgrade tracing to 0.1.36.Nick Mathewson2023-05-0318-18/+18
| | | | | | | | | | | | This is the first version to impl Value for String. With luck, this will get minimal_versions CI passing.
| * DirMgr: More logs in top-level bootstrapping code.Nick Mathewson2023-05-031-5/+12
| | | | | | | | Closes #803, I hope.
| * DirMgr: more trace!() logs and information in download/load functions.Nick Mathewson2023-05-031-8/+30
| | | | | | | | | | | | | | My goal here is to make sure that we can't confuse one download operation and another, and that we actually know what's going on. Previously, not all state transitions or attempts to fetch information actually corresponded to a log.
| * DirMgr: Log at trace! when starting a new "AttemptId".Nick Mathewson2023-05-031-1/+7
| |
* | Merge branch 'hsdesc-parse-decrypt-validate' into 'main'gabi-2502023-05-032-1/+75
|\ \ | |/ |/| | | | | | | | | netdoc: Add a convenience method for HS descriptor parsing. Closes #809 See merge request tpo/core/arti!1152
| * netdoc: Mark parse_decrypt_validate as experimental.Gabriela Moldovan2023-05-022-0/+6
| | | | | | | | Signed-off-by: Gabriela Moldovan <[email protected]>
| * netdoc: Document how to extract an `HsDesc` out of an ↵Gabriela Moldovan2023-04-251-0/+32
| | | | | | | | | | | | | | | | | | `UncheckedEncryptedHsDesc`. This adds an example to the `HsDesc::parse` docs. The constants from the example are lifted from the `parse_desc_good` test. Signed-off-by: Gabriela Moldovan <[email protected]>
| * netdoc: Add a convenience method for HS descriptor parsing.Gabriela Moldovan2023-04-252-1/+37
| | | | | | | | | | | | | | | | | | This adds the `HsDesc::parse_decrypt_validate` method, which parses, decrypts, and validates HS descriptors. Closes #809 Signed-off-by: Gabriela Moldovan <[email protected]>
* | Remove semver.md files.Nick Mathewson2023-05-033-3/+0
| |
* | Increment crate versions.Nick Mathewson2023-05-0343-298/+298
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because of the errorkind bumps, we're calling this a breaking change in everything lower-level than `arti`. Generated with: ``` cargo set-version -p tor-basic-utils --bump minor cargo set-version -p tor-async-utils --bump minor cargo set-version -p caret --bump minor cargo set-version -p fs-mistrust --bump minor cargo set-version -p safelog --bump minor cargo set-version -p retry-error --bump minor cargo set-version -p tor-error --bump minor cargo set-version -p tor-config --bump minor cargo set-version -p tor-events --bump minor cargo set-version -p tor-units --bump minor cargo set-version -p tor-rtcompat --bump minor cargo set-version -p tor-rtmock --bump minor cargo set-version -p tor-rpcbase --bump minor cargo set-version -p tor-llcrypto --bump minor cargo set-version -p tor-protover --bump minor cargo set-version -p tor-bytes --bump minor cargo set-version -p tor-hscrypto --bump minor cargo set-version -p tor-socksproto --bump minor cargo set-version -p tor-checkable --bump minor cargo set-version -p tor-cert --bump minor cargo set-version -p tor-linkspec --bump minor cargo set-version -p tor-cell --bump minor cargo set-version -p tor-proto --bump minor cargo set-version -p tor-netdoc --bump minor cargo set-version -p tor-consdiff --bump minor cargo set-version -p tor-netdir --bump minor cargo set-version -p tor-congestion --bump minor cargo set-version -p tor-persist --bump minor cargo set-version -p tor-chanmgr --bump minor cargo set-version -p tor-ptmgr --bump minor cargo set-version -p tor-guardmgr --bump minor cargo set-version -p tor-circmgr --bump minor cargo set-version -p tor-dirclient --bump minor cargo set-version -p tor-dirmgr --bump minor cargo set-version -p tor-hsclient --bump minor cargo set-version -p tor-hsservice --bump minor cargo set-version -p arti-client --bump minor cargo set-version -p arti-rpcserver --bump minor cargo set-version -p arti-config --bump minor cargo set-version -p arti-hyper --bump minor cargo set-version -p arti --bump patch cargo set-version -p arti-bench --bump patch cargo set-version -p arti-testing --bump patch ```
* | Merge branch 'relayid' into 'main'Alexander Færøy2023-05-022-12/+13
|\ \ | | | | | | | | | | | | RelayId: Remove some duplication and relax a lifetime See merge request tpo/core/arti!1156
| * | RelayId: implement id_type and as_bytes in terms of RelayIdRefIan Jackson2023-04-271-8/+2
| | | | | | | | | | | | This eliminates some duplicated code.
| * | RelayIdRef: as_bytes: Doesn't borrow from selfIan Jackson2023-04-272-1/+2
| | | | | | | | | | | | | | | | | | | | | This borrows from the contained key, but not from self. This will allow us to implement RelayId::as_bytes in terms of RelayIdRef::as_bytes.
| * | RelayId: impl Display in terms of RelayIdRefIan Jackson2023-04-271-3/+9
| |/ | | | | | | This removes a duplicated copy of the format strings.
* | arti-client: Only run BridgesConfig doc test if pt-client feature is enabled.Gabriela Moldovan2023-05-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One of the tests run as part of `cargo test -p arti-client` fails because the `pt-client` feature is not enabled by default: ``` failures: ---- src/config.rs - config::BridgesConfig (line 221) stdout ---- error[E0432]: unresolved import `arti_client::config::pt` --> src/config.rs:225:26 | 7 | use arti_client::config::pt::ManagedTransportConfigBuilder; | ^^ could not find `pt` in `config` error[E0599]: no method named `bridges` found for mutable reference `&mut BridgesConfigBuilder` in the current scope --> src/config.rs:233:19 | 15 | builder.bridges().bridges().push(bridge_1); | ^^^^^^^ private field, not a method error[E0599]: no function or associated item named `default` found for struct `BridgeConfigBuilder` in the current scope --> src/config.rs:236:48 | 18 | let mut bridge2_builder = BridgeConfigBuilder::default(); | ^^^^^^^ function or associated item not found in `BridgeConfigBuilder` error[E0599]: no method named `bridges` found for mutable reference `&mut BridgesConfigBuilder` in the current scope --> src/config.rs:247:19 | 29 | builder.bridges().bridges().push(bridge2_builder); | ^^^^^^^ private field, not a method error[E0599]: no method named `transports` found for mutable reference `&mut BridgesConfigBuilder` in the current scope --> src/config.rs:255:19 | 37 | builder.bridges().transports().push(transport); | ^^^^^^^^^^ method not found in `&mut BridgesConfigBuilder` error: aborting due to 5 previous errors Some errors have detailed explanations: E0432, E0599. For more information about an error, try `rustc --explain E0432`. Couldn't compile the test. failures: src/config.rs - config::BridgesConfig (line 221) test result: FAILED. 5 passed; 1 failed; 3 ignored; 0 measured; 0 filtered out; finished in 2.10s ``` This disables the `BridgesConfig` doc test if the `pt-client` feature is not enabled. Closes #843 Signed-off-by: Gabriela Moldovan <[email protected]>
* | Upgrade to serial_test 2.0.0Nick Mathewson2023-04-281-1/+1
|/