summaryrefslogtreecommitdiff
path: root/crates/arti-client/src/err.rs
Commit message (Collapse)AuthorAgeFilesLines
* arti-client: add a minimal onion-service-launching API.Nick Mathewson2023-09-271-0/+8
|
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-231-0/+1
|
* arti-client: Fix a couple more typos.Nick Mathewson2023-08-221-1/+1
| | | | I spotted these while I was working on something else.
* Resolve warnings about ambiguous/redundant doc linksNick Mathewson2023-08-221-2/+2
| | | | | Nightly rustdoc now warns if you have a link that isn't necessary, and if you have a link that might refer to two different things.
* Fix and expand the description of OnionAddressDisabledNick Mathewson2023-08-031-2/+9
| | | | | Previously there was a missing "not", and it didn't say what to do about the error.
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|
* arti-client: Rename KeyStore to Keystore.Gabriela Moldovan2023-06-301-1/+1
| | | | | | | | | | | | | `KeyStore` was renamed to `Keystore` globally in !1355. This fixes a compile error caused an unfortunate series of non-conflicting (from git's POV) but incompatible merges: * !1356 added a line threferencing an error variant that capitalizes the "s" in "KeyStore" (`ErrorDetail::KeyStore`) * !1356 landed just before !1355 (the global renaming). Since there was no conflict between the 2, we're now in a state where the code added in !1356 is referencing an `ErrorDetail` variant that no longer exists.
* Merge branch 'keymgr-naming' into 'main'Alexander Færøy2023-06-301-2/+2
|\ | | | | | | | | keymgr: Rename KeyStore to Keystore globally. See merge request tpo/core/arti!1355
| * keymgr: Rename KeyStore to Keystore globally.Gabriela Moldovan2023-06-291-2/+2
| | | | | | | | | | We've been capitalizing the "s" in "KeyStore" inconsistently. This `s/KeyStore/Keystore/g` across the codebase.
* | keymgr: Fix another infinite loop around Keymgr error handling.Gabriela Moldovan2023-06-291-1/+1
|/ | | | This `From` impl was just calling itself recursively...
* arti_client: Move BadOnion from TorAddrError to ErrorDetail.Nick Mathewson2023-06-291-10/+7
| | | | | | | | | | This variant can never be constructed when parsing a TorAddr, so it doesn't make sense to have it in TorAddrError: the use can never see it unless they enable `error_detail`. Not a semver break because the client feature is not yet stable. Closes #932.
* keymgr: Move dummy implementation to tor-keymgr.Gabriela Moldovan2023-06-221-3/+3
|
* arti-client: Add an Error type for the dummy key manager.Gabriela Moldovan2023-06-201-6/+3
| | | | Part of #897
* arti-client: Provide ErrorDetailDiscriminants for convenient testingIan Jackson2023-06-161-0/+2
| | | | | ErrorDetail isn't PartialEq so we can't assert_eq! it. But the discriminants will be.
* arti-client: StreamPrefs::connect_to_onion_services: honourIan Jackson2023-06-161-0/+7
|
* arti-client: OnionAddressNotSupported: Change description and kindIan Jackson2023-06-161-3/+3
| | | | | Previously this error meant "we haven't written this code yet". Now, we change it to "you haven't built Arti with this feature".
* arti-client: Rename hs feature to onion-service-client (cfg lines)Ian Jackson2023-06-161-8/+8
|
* arti-client: Use a dummy key manager if the keymgr feature is disabled.Gabriela Moldovan2023-06-151-3/+3
| | | | | | | | | TorClient now only uses the tor_keymgr::KeyMgr implementation if the keymgr experimental feature is enabled. If the feature is disabled, a dummy key manager implementation is used. The new `keymgr` feature depends on `onion-client`, because the key manager is only used for HS client auth.
* arti-client: Implement From<tor_keymgr::Error> for Error.Gabriela Moldovan2023-06-151-0/+7
|
* arti-client: Make the client use the KeyMgr.Gabriela Moldovan2023-06-151-0/+7
| | | | | `TorClient` now uses a `KeyMgr` to retrieve the `HsClientSecretKeys` client auth keys passed to `get_or_launch_connection`.
* tor-hsconn: Rename ConnError (from HsClientConnError)Ian Jackson2023-03-301-2/+2
| | | | | The old name was unwieldy and other crates can just as well name it by the crate scope.
* Tidy up an unused import warningIan Jackson2023-03-281-1/+3
| | | | | | Now cargo +stable clippy --locked --offline --workspace --all-targets is clean.
* arti-client: Include redacted HsId in ObtainHsCircuit errorIan Jackson2023-03-231-3/+3
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1071/diffs?commit_id=580fe1118dbbbfa086d11b28e3e26d7c91afe21c#fbd7ab2d6d0a5b515697d4f9f99a42ebd508aa4b_153_165
* arti-client: Call tor-hsclient to create HS connectionsIan Jackson2023-03-231-0/+16
| | | | | Obviously this still doesn't work because the actual impl in hsclient is just a todo!().
* arti-client: Create an HsClientConnectorIan Jackson2023-03-231-0/+7
|
* Classify OnionAddressResolveRequest as NotImplementedIan Jackson2023-03-091-2/+1
| | | | | | | | We have a theory about how this ought to work, so it's noit an API usage error - it's an unimplemented feature. As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1060#note_2884757
* Improve error from HsId parse of "www.B32.onion"Ian Jackson2023-03-091-0/+1
| | | | And add some clarity and todos about address errors.
* Avoid arti_client::ErrorDetail::Address for TorAddrError::InvalidHostnameIan Jackson2023-03-091-1/+19
| | | | Provide an explicit From impl isntead.
* arti-client: Parse .onion addresses and dispatch to client.rsIan Jackson2023-03-091-2/+15
| | | | | | | Now, a Host has a separate variant for `.onion` which is always used, even when HS is disabled. Currently it ends in a todo!.
* ErrorHint: Add a note about lowering the permissions hintNick Mathewson2023-01-271-0/+4
|
* ErrorHint: use anonymize_homeNick Mathewson2023-01-271-2/+4
|
* ErrorHint: Implement tryfrom_torpersistNick Mathewson2023-01-271-2/+6
|
* ErrorHint: refactor API (part 2)Nick Mathewson2023-01-271-75/+60
| | | | | | | Change ErrorHint so that, internally, it just holds an enum with a lightweight reference to whatever parts of the error it needs to generate a hint. Then we can move the formatting logic into a Display function for ErrorHint, and do away with ErrorDetail entirely.
* ErrorHint: refactor API (part 1)Nick Mathewson2023-01-271-13/+19
| | | | | | | Move the "hint" function into Error, and use Option rather than Result. (I'm using Option here because it's not really an error case not to have a hint; we just either have a hint, or we don't.)
* add opaque ErrorHint API, impl ErrorHint from BadPermissionsShady Katy2023-01-271-0/+138
|
* Allow clippy::unchecked_duration_subtraction in testsNick Mathewson2023-01-271-0/+1
| | | | | This panics on error, and we're fine with a panic on misbehavior in tests.
* test lint blocks: Add many many automaticallyIan Jackson2022-12-121-0/+9
| | | | | This is precisely the result of running the rune in maint/adhoc-add-lint-blocks.
* arti-client: spelling fix.Nick Mathewson2022-12-061-1/+1
|
* Spelling fix in arti_client::erreta2022-11-291-1/+1
|
* PtMgr: Use a persistent state directory for PT state.Nick Mathewson2022-11-281-0/+5
| | | | | | | | | | This makes a `pt_state` directory inside .local/share/arti (or the local equivalent), right next to our existing `state` dir. Ideally we would use a separate directory for each PT, but we have a very fuzzy "what is a specific PT" notion. Closes #667
* Integrate PtMgr into arti-client.Nick Mathewson2022-11-281-0/+7
| | | | | | | | If support is available at compile-time, then we construct a PtMgr and register it with the ChanMgr. We keep a handle to it ourself so that we can reconfigure it as needed. Closes #659.
* bridges: Create and install a BridgeDescMgr when we bootstrapIan Jackson2022-11-151-0/+7
|
* Move GuardMgr::new call to arti_client::TorClientIan Jackson2022-11-141-0/+6
| | | | | | | Having this done within circmgr was irregular - most of our other key buildup functions are done in TorClient::create_inner. It is also inconvenient, as it buries the guardmgr within the circmgr.
* arti-client: Treat list of exit ports as sensitive.Nick Mathewson2022-08-251-1/+2
|
* add feature annotation not added by doc_auto_cfgtrinity-1686a2022-08-241-0/+1
|
* Several typo fixes from `typos`.Nick Mathewson2022-07-271-1/+1
|
* Update arti-client to new NetDirProvider API.Nick Mathewson2022-07-261-0/+12
| | | | | | This allows us to give better errors in the case where bootstrapping succeeds at first, but fails thereafter for long enough to make our directory expire.
* arti-client: Split "Persist" into setup and access variants.Nick Mathewson2022-07-211-3/+8
|
* arti_client: turn "Proto" error into StreamFailed.Nick Mathewson2022-07-211-3/+10
|
* arti_client: Split DirMgr error into useful types.Nick Mathewson2022-07-211-4/+10
|