pub enum CoreError {
Show 27 variants
InvalidHeaderLength(usize),
InvalidMagic,
UnsupportedVersion(u8),
UnsupportedProfile(u8),
UnknownFlags(u8),
CiphertextLengthMismatch {
expected: usize,
actual: usize,
},
Aead,
Hkdf,
InvalidKeyLength,
UnexpectedKeyId {
expected: u8,
actual: u8,
},
InvalidControlMessage,
UnexpectedControlMessage,
InvalidSessionState,
MissingSessionSecret,
InvalidTlv,
TlvTooLarge,
Replay,
ReplayWindowExceeded,
FrameTooLarge,
UnexpectedEof,
Io(Error),
InvalidSharedSecret,
SequenceExhausted,
KeyIdExhausted,
MissingPeerAuthentication,
InvalidPeerAuthentication,
PeerIdentityMismatch,
}Expand description
Core protocol error type.
Variants§
InvalidHeaderLength(usize)
Frame header length is not FRAME_HEADER_LEN.
InvalidMagic
Frame magic is invalid.
UnsupportedVersion(u8)
Protocol version is unsupported.
UnsupportedProfile(u8)
Crypto profile is unsupported.
UnknownFlags(u8)
Header flags contain unknown bits.
CiphertextLengthMismatch
Header ciphertext length does not match payload length.
Fields
Aead
AEAD operation failed.
Hkdf
HKDF expansion failed.
InvalidKeyLength
Symmetric key length is invalid.
UnexpectedKeyId
Received key ID does not match expected one.
InvalidControlMessage
Control payload is malformed.
UnexpectedControlMessage
Control payload is not valid for current protocol state.
InvalidSessionState
Session operation was called in an invalid state.
MissingSessionSecret
Session/shared secret is not available.
InvalidTlv
TLV payload is malformed.
TlvTooLarge
TLV payload exceeds configured limits.
Replay
Replay check detected a duplicate frame.
ReplayWindowExceeded
Frame sequence is outside replay window.
FrameTooLarge
Frame exceeds configured size limits.
UnexpectedEof
Unexpected EOF while reading/writing frame bytes.
Io(Error)
Underlying I/O error.
X25519 produced a forbidden all-zero shared secret.
SequenceExhausted
Outbound sequence space is exhausted and must not wrap.
KeyIdExhausted
Rekey key identifier space is exhausted and must not wrap.
MissingPeerAuthentication
Peer authentication was required but not present.
InvalidPeerAuthentication
Peer authentication failed validation.
PeerIdentityMismatch
Peer identity did not match the pinned expectation.
Trait Implementations§
Source§impl Error for CoreError
impl Error for CoreError
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()