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/peer.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/peer.rs')
-rw-r--r-- | src/handshake/peer.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/handshake/peer.rs b/src/handshake/peer.rs index 309a9cf..9645799 100644 --- a/src/handshake/peer.rs +++ b/src/handshake/peer.rs @@ -26,7 +26,7 @@ pub struct Peer<T> { timestamp: Mutex<Option<timestamp::TAI64N>>, // state related to DoS mitigation fields - pub(crate) macs: macs::Generator, + pub(crate) macs: Mutex<macs::Generator>, // constant state pub(crate) pk: PublicKey, // public key of peer @@ -73,7 +73,7 @@ where ss: SharedSecret, // precomputed DH(static, static) ) -> Self { Self { - macs: macs::Generator::new(pk), + macs: Mutex::new(macs::Generator::new(pk)), identifier: identifier, state: Mutex::new(State::Reset), timestamp: Mutex::new(None), |