diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2019-08-01 13:25:50 +0200 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2019-08-01 13:25:50 +0200 |
commit | 0f92468f6978c7ce13b33558e5bc36f94a2b7e4e (patch) | |
tree | 0f62cc1de07207a3e48ad4e1750277ce4df31344 /src/handshake/types.rs | |
parent | Make unit tests pass (diff) | |
download | wireguard-rs-0f92468f6978c7ce13b33558e5bc36f94a2b7e4e.tar.xz wireguard-rs-0f92468f6978c7ce13b33558e5bc36f94a2b7e4e.zip |
Successfully validate mac1 field
Diffstat (limited to 'src/handshake/types.rs')
-rw-r--r-- | src/handshake/types.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/handshake/types.rs b/src/handshake/types.rs index 0d9a5d3..6a35e1c 100644 --- a/src/handshake/types.rs +++ b/src/handshake/types.rs @@ -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"), } } } |