summaryrefslogtreecommitdiff
path: root/crates/tor-hsservice/src/err.rs
Commit message (Collapse)AuthorAgeFilesLines
* Use tor_basic_utils::PathExt::display_lossyIan Jackson2024-03-051-2/+2
| | | | | Change Path::display to this new function, in call sites where it's being used for a diagnostic.
* tor-hsservice: prelude: Move imports from err.rsIan Jackson2024-03-051-12/+1
|
* tor-hsservice: Move rend_handshake.rs out of svcIan Jackson2024-03-051-1/+1
|
* tor-hsservice: ipt mgr: Move/rename to StateExpiryError (followup)Ian Jackson2024-02-131-4/+4
|
* tor-hsservice: ipt mgr: Move/rename to StateExpiryErrorIan Jackson2024-02-131-0/+37
| | | | | The private ExpiryError type is now err::StateExpiryError. We'll fix up the local alias in the HasKind impl in a moment.
* tor-hsservice: Use ErrorKind::KeystoreAccessFailed for KeystoreRace errors.Gabriela Moldovan2024-02-011-1/+1
|
* tor-hsservice: Add FatalError::KeystoreRace.Gabriela Moldovan2024-02-011-0/+13
| | | | This will be used when a keystore race is detected.
* tor-hsservice: Remove now-unused importsIan Jackson2024-02-011-1/+0
|
* tor-hsservice: Abolish StartupError::StateLockedIan Jackson2024-02-011-5/+0
| | | | This is now tor_persist::Error containing ErrorSource::AlreadyLocked.
* tor-hsservice: Use tor_persist::state_dirIan Jackson2024-02-011-5/+2
| | | | | | | | | | | | | | | | | | | | | | | We no longer do replay log locking in IptManager::new. Instead, we rely on the acquire_instance call in OnionService::launch, which ends up with ipt_mgr getting an InstanceHandle (which contains a lock guard). OnionServiceStateMgr is abolished; it existed to deal with the generics in the tor_persist::StateMgr API. state_dir has no generics (other than the T being loaded/stored). Many places (structs and argument lists) now have state_dir types which embody a path (or a CheckeDir) along with a lock, rather than separate path+lock+mistrust. The creation/startup code uses the new calls from state_dir. Other more minor changes: - StartupError::StateDirectoryInaccessible contains tor_persist::Error - test::create_storage_handles_from_state_dir changed and renamed, from _from_state_mgr. - replay::PersistFile's (separate) file lock is now fslock_guard's
* tor-hsservice: Introduce StartupError::StateDirectoryInaccessibleIoIan Jackson2024-02-011-0/+21
| | | | | | We're going to change the payload of StateDirectoryInaccessible to tor_persist::Error, since that's what tor_persist::state_dir gives us, but then we can't use it here.
* hss: Downgrade MissingHsIdKeypair TODONick Mathewson2024-01-241-1/+1
| | | | | This is not typically wrong, but it may become wrong if we do not tidy up MissingHsIdKeypair in the future. The TODO now refers to
* hss: Return LocalResourceAlreadyInUse on StateLocked.Nick Mathewson2024-01-231-2/+1
|
* hsservice: Convert TODO about behavior on storage errors to #1226.Nick Mathewson2024-01-121-1/+5
|
* hsservice: Turn FatalError todo into part of #1083.Nick Mathewson2024-01-121-2/+2
|
* hsservice: Downgrade TODO HSS about internal fn on IptStoreErrorNick Mathewson2024-01-121-1/+1
|
* hsservice: Move "Cleanup ErrorKind" TODOs to #1225.Nick Mathewson2024-01-121-2/+2
|
* Fix typosDimitris Apostolou2024-01-081-1/+1
|
* tor-hsservice: Make IPT logs be persistentIan Jackson2023-12-131-0/+9
|
* tor-hsservice: Add a NetdirProviderShutdown FatalError variant.Gabriela Moldovan2023-12-131-1/+7
| | | | This is another type of fatal error.
* tor-hsservice: Add a FatalError::from_spawn.Gabriela Moldovan2023-12-131-0/+12
| | | | We're about to use this (in the publisher reactor).
* tor-hsservice: Use keystore to store and reuse IPT keysIan Jackson2023-12-041-0/+8
|
* tor-hsservice: Provide StartupError variants for failed state readsIan Jackson2023-12-041-0/+26
|
* tor-hsservice: Introduce IptStoreErrorIan Jackson2023-12-041-0/+49
| | | | | | | | | | If we can't store IPT details, we mustn't publish the corresponding IPT. But that's not fatal; maybe we can store later. So introduce a new IptStoreError type, and change the return value from some functions that are going to be able to fail that way. This introduces a new TODO HSS: we need the publisher to be able to retry after such a failure.
* tor-keymgr: Add a top-level error type.Gabriela Moldovan2023-11-211-3/+2
| | | | | | | | | | | | | 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-hsservice: Update MissingHsIdKey docs, remove outdated TODO HSS.Gabriela Moldovan2023-11-201-6/+1
|
* tor-hsservice: Rename MissingKey to MissingHsIdKeypair.Gabriela Moldovan2023-11-201-3/+4
| | | | | | | | | We only return this error if the identity key is missing from the keystore. This change will also help us abolish the `.role()` method on `KeySpecifier`s (it was only needed for populating the string of a `MissingKey` error).
* HSS: impl HasKind for FatalErrorIan Jackson2023-11-011-0/+13
|
* tor-hsservice: Add some TODOs about error handling.Gabriela Moldovan2023-10-191-0/+5
|
* tor-hsservice: Replace placeholder subcredentials with values from the keystore.Gabriela Moldovan2023-10-191-0/+8
|
* tor-hsservice: Make OnionServices auto-generate the hs_id, if it's missing.Gabriela Moldovan2023-10-091-0/+17
|
* hss: implement HasKind for several errors.Nick Mathewson2023-09-271-0/+19
|
* tor-hsservice: Make Publisher::launch return a StartupError.Gabriela Moldovan2023-09-271-11/+0
| | | | | | This simplifies error handling in `OnionService`. Closes #1052
* hss: Implement HasKind for StartupErrorNick Mathewson2023-09-261-1/+15
|
* hss: fix error return from OnionService::launch()Nick Mathewson2023-09-211-0/+8
|
* hss: start filling in a "launch" function for OnionService.Nick Mathewson2023-09-211-0/+4
|
* HSS: Enable RendRequests to be answered.Nick Mathewson2023-09-201-2/+12
| | | | | This requires yet more plumbing—this time, of HsCircPool and NetDirProvider.
* tor-hsservice: About half of an IPT ManagerIan Jackson2023-08-231-1/+20
| | | | There are many TODOs and no tests, but it does compile.
* tor-hsservice errors: Distinguish operational errors by contextIan Jackson2023-08-171-2/+46
| | | | | | | | | | At the very least, I need FatalError to be distinct: IptEstablisher::new ought not to fail unless everything is terrible. Add a the Spawn variant to FatalError (that we'll need soon) and the Bug variant (which it seems likely we might need). This also gets rid of the crate-level Result alias.
* Sketch an API for onion services.Nick Mathewson2023-01-241-0/+8