pub enum IkeError {
Truncated {
need: usize,
have: usize,
},
BadLength {
declared: usize,
available: usize,
},
ShortPayload(u16),
MissingPayload(&'static str),
NoProposalChosen,
DhGroupMismatch {
expected: u16,
got: u16,
},
BadKeyExchange {
group: u16,
len: usize,
},
BadIntegrity,
AuthFailed,
Crypto(&'static str),
}Expand description
Errors from parsing or processing IKEv2 messages.
Variants§
Truncated
The buffer ended before a fixed-size field could be read.
BadLength
A declared length pointed past the end of the buffer.
ShortPayload(u16)
A generic payload header declared a length smaller than the 4-byte header itself, which would loop forever.
MissingPayload(&'static str)
A payload required for this exchange was absent.
NoProposalChosen
None of the offered proposals used a suite we support.
DhGroupMismatch
The peer’s Key Exchange used a DH group other than the negotiated one.
BadKeyExchange
The Key Exchange data length is wrong for its DH group.
BadIntegrity
AEAD (GCM) authentication of an SK payload failed — wrong key, wrong associated data, or tampering.
AuthFailed
The peer’s AUTH payload did not verify (wrong PSK or altered SA_INIT).
Crypto(&'static str)
A cryptographic precondition was violated (e.g. bad key length).
Trait Implementations§
impl Eq for IkeError
Source§impl Error for IkeError
impl Error for IkeError
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()