Enum tor_netdoc::doc::hsdesc::HsDescError
source · #[non_exhaustive]pub enum HsDescError {
OuterParsing(Error),
OuterValidation(Error),
MissingDecryptionKey,
WrongDecryptionKey,
DecryptionFailed,
InnerParsing(Error),
InnerValidation(Error),
Bug(Bug),
}
hs-common
only.Expand description
An error returned by HsDesc::parse_decrypt_validate
, indicating what
kind of failure prevented us from validating an onion service descriptor.
This is distinct from tor_netdoc::Error
so that we can
tell errors that could be the HsDir’s fault from those that are definitely
protocol violations by the onion service.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
OuterParsing(Error)
An outer object failed parsing: the HsDir should probably have caught this, and not given us this HsDesc.
(This can be an innocent error if we happen to know about restrictions that the HsDir does not).
OuterValidation(Error)
An outer object failed validation: the HsDir should probably have caught this, and not given us this HsDesc.
(This can happen erroneously if we think that something is untimely but the HSDir’s clock is slightly different, or was different when it decided to give us this object.)
MissingDecryptionKey
Decrypting the inner layer failed because we need to have a decryption key, but we didn’t provide one.
This is probably our fault.
WrongDecryptionKey
Decrypting the inner layer failed because, although we provided a key, we did not provide the key we need to decrypt it.
This is probably our fault.
DecryptionFailed
Decrypting the inner or middle layer failed because of an issue with the decryption itself.
This is the onion service’s fault.
InnerParsing(Error)
We failed to parse something cryptographic in an inner layer of the onion service descriptor.
This is definitely the onion service’s fault.
InnerValidation(Error)
We failed to validate something cryptographic in an inner layer of the onion service descriptor.
This is definitely the onion service’s fault.
Bug(Bug)
We encountered an internal error.
Trait Implementations§
source§impl Clone for HsDescError
impl Clone for HsDescError
source§fn clone(&self) -> HsDescError
fn clone(&self) -> HsDescError
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for HsDescError
impl Debug for HsDescError
source§impl Display for HsDescError
impl Display for HsDescError
source§impl Error for HsDescError
impl Error for HsDescError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl From<Bug> for HsDescError
impl From<Bug> for HsDescError
Auto Trait Implementations§
impl Freeze for HsDescError
impl !RefUnwindSafe for HsDescError
impl Send for HsDescError
impl Sync for HsDescError
impl Unpin for HsDescError
impl !UnwindSafe for HsDescError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<E> ErrorReport for Ewhere
E: Error + 'static,
impl<E> ErrorReport for Ewhere
E: Error + 'static,
source§fn report(&self) -> Report<ReportHelper<'_>>
fn report(&self) -> Report<ReportHelper<'_>>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more