diff options
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), |