Skip to content
Snippets Groups Projects
Commit d8565206 authored by gabi-250's avatar gabi-250 :face_with_spiral_eyes:
Browse files

tor-hsservice: Add an error type for subcredential lookup failures.

The subcredential lookup will be moved to
`IntroRequest::decrypt_from_introduce2`. The error returned on failure
is going to be `IntroRequestError::Subcredentials`.

Part of #1242
parent 8d50447e
No related branches found
No related tags found
1 merge request!1901tor-hsservice: Do not store the subcredentials in RendRequestContext.
ADDED: `RunningOnionService`, `OnionServiceState`
BREAKING: `OnionService` API changes
BREAKING: renamed stop to pause, then removed it.
ADDED: `IntroRequestError::Subcredentials`
......@@ -49,6 +49,10 @@ pub enum IntroRequestError {
/// We weren't able to build a ChanTarget from the Introduce2 message.
#[error("Invalid link specifiers in INTRODUCE2 payload")]
InvalidLinkSpecs(#[source] tor_linkspec::decode::ChanTargetDecodeError),
/// We weren't able to obtain the subcredentials for decrypting the Introduce2 message.
#[error("Could not obtain subcredebtials")]
Subcredentials(#[source] crate::FatalError),
}
impl HasKind for IntroRequestError {
......@@ -59,6 +63,7 @@ impl HasKind for IntroRequestError {
E::InvalidHandshake(e) => e.kind(),
E::InvalidPayload(_) => EK::RemoteProtocolViolation,
E::InvalidLinkSpecs(_) => EK::RemoteProtocolViolation,
E::Subcredentials(e) => e.kind(),
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment