aboutsummaryrefslogtreecommitdiffstats
path: root/src/handshake/types.rs
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2019-08-03 14:45:45 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2019-08-03 14:45:45 +0200
commitbaebac5bec42743ea49644d4a836c6162cfe613f (patch)
tree5afae3688ea89c03b3f53fb5468065730eb8dce5 /src/handshake/types.rs
parentAdded property-based test for full DoS interaction (diff)
downloadwireguard-rs-baebac5bec42743ea49644d4a836c6162cfe613f.tar.xz
wireguard-rs-baebac5bec42743ea49644d4a836c6162cfe613f.zip
Validate mac2 field
Diffstat (limited to 'src/handshake/types.rs')
-rw-r--r--src/handshake/types.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/handshake/types.rs b/src/handshake/types.rs
index 6a35e1c..38b044e 100644
--- a/src/handshake/types.rs
+++ b/src/handshake/types.rs
@@ -43,6 +43,7 @@ pub enum HandshakeError {
OldTimestamp,
InvalidState,
InvalidMac1,
+ InvalidMac2
}
impl fmt::Display for HandshakeError {
@@ -57,6 +58,7 @@ impl fmt::Display for HandshakeError {
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"),
+ HandshakeError::InvalidMac2 => write!(f, "Message has invalid mac2 field"),
}
}
}