Successfully validate mac1 field

This commit is contained in:
Mathias Hall-Andersen
2019-08-01 13:25:50 +02:00
parent ab98d9dced
commit 0f92468f69
4 changed files with 99 additions and 29 deletions

View File

@@ -42,6 +42,7 @@ pub enum HandshakeError {
InvalidMessageFormat,
OldTimestamp,
InvalidState,
InvalidMac1,
}
impl fmt::Display for HandshakeError {
@@ -55,6 +56,7 @@ impl fmt::Display for HandshakeError {
HandshakeError::InvalidMessageFormat => write!(f, "Invalid handshake message format"),
HandshakeError::OldTimestamp => write!(f, "Timestamp is less/equal to the newest"),
HandshakeError::InvalidState => write!(f, "Message does not apply to handshake state"),
HandshakeError::InvalidMac1 => write!(f, "Message has invalid mac1 field"),
}
}
}