pub enum HandshakeError {
Show 19 variants
UnexpectedFrame,
UnsupportedVersion,
ProfileUnsupported,
DowngradeDetected,
NegotiationMismatch,
VersionBelowFloor,
Malformed,
KeyPurposeReuse,
PeerIdentityMismatch {
expected: [u8; 32],
derived: [u8; 32],
},
PuzzleInvalid,
ProofInvalid,
Refused {
code: RefusalCode,
station_ranges: Option<Ranges>,
},
InvalidStationSession,
SessionProofInvalid,
SessionProofMissing,
SessionProofRate,
ExporterUnavailable,
Binding(BindingError),
Key(KeyError),
}Expand description
The handshake’s close reasons, named as macula names them. A binding or
status statement that fails its check closes with its BindingError.
Variants§
UnexpectedFrame
A frame of another type than the one expected next.
UnsupportedVersion
A frame of another version than 5, or ranges that share no version
(unsupported_version).
ProfileUnsupported
Profile lists that share no profile, or a CONNECT naming a profile the
station did not choose (profile_unsupported).
DowngradeDetected
A challenge whose chosen version or profile is not the highest common
one of the client’s ranges and the station’s repeated ranges
(downgrade_detected).
NegotiationMismatch
A CONNECT whose versions or profiles differ from the opener’s
(negotiation_mismatch).
VersionBelowFloor
A chosen version below the one this end last completed with that
node_id (version_below_floor).
Malformed
A frame that does not decode exactly, or a carried key or proof of the
wrong form (malformed_frame).
KeyPurposeReuse
A key that would serve two purposes: a CONNECT key that shares a half with its identity key, or a key found in the leaf.
PeerIdentityMismatch
A station whose node_id is not the one dialed.
PuzzleInvalid
A client whose node_id does not meet the puzzle.
ProofInvalid
A CONNECT proof that does not verify.
Refused
A HELLO that refuses the connection, with its code, and the station’s ranges when it refused before the challenge.
InvalidStationSession
A station session with a puzzle difficulty the design does not have.
SessionProofInvalid
A HELLO whose session proof does not verify under the station’s identity key over this session.
SessionProofMissing
A HELLO that accepts without a session proof.
SessionProofRate
A station past its session proof budget.
A session whose TLS exporter gave no value.
Binding(BindingError)
A binding or status statement that did not verify.
Key(KeyError)
A key that could not sign, or randomness that could not be drawn.
Trait Implementations§
Source§impl Clone for HandshakeError
impl Clone for HandshakeError
Source§impl Debug for HandshakeError
impl Debug for HandshakeError
Source§impl Display for HandshakeError
impl Display for HandshakeError
impl Eq for HandshakeError
Source§impl Error for HandshakeError
impl Error for HandshakeError
1.30.0 · 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
use the Display impl or to_string()