pub enum HandshakeError {
Show 17 variants
UnexpectedFrame,
UnsupportedVersion,
Malformed,
ProfileMismatch,
KeyPurposeReuse,
PeerIdentityMismatch {
expected: [u8; 32],
derived: [u8; 32],
},
PuzzleInvalid,
ProofInvalid,
Refused(RefusalCode),
InvalidStationSession,
SessionProofInvalid,
SessionProofMissing,
SessionProofRate,
V4HelloToV5Connect,
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 4.
Malformed
A frame that does not decode exactly, or a carried key or proof of the wrong form.
ProfileMismatch
A challenge that names another profile.
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(RefusalCode)
A HELLO that refuses the connection, with its code.
InvalidStationSession
A station session with a puzzle difficulty the design does not have.
SessionProofInvalid
A v5 HELLO whose session proof does not verify under the station’s identity key over this session.
SessionProofMissing
A v5 HELLO that accepts without a session proof.
SessionProofRate
A station past its session proof budget.
V4HelloToV5Connect
A v4 HELLO that accepts a v5 CONNECT: never taken as a v4 connection.
A v5 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()