From 5b555a2e176bd5310d2efa614f67c96cb314eda4 Mon Sep 17 00:00:00 2001 From: Mathias Hall-Andersen Date: Mon, 11 Nov 2019 23:13:46 +0100 Subject: Work on UAPI serialize device --- src/wireguard/handshake/device.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/wireguard/handshake') diff --git a/src/wireguard/handshake/device.rs b/src/wireguard/handshake/device.rs index 85c2e45..f65692c 100644 --- a/src/wireguard/handshake/device.rs +++ b/src/wireguard/handshake/device.rs @@ -202,7 +202,7 @@ impl Device { /// A 32 byte array holding the PSK /// /// The call might fail if the public key is not found - pub fn get_psk(&self, pk: PublicKey) -> Result { + pub fn get_psk(&self, pk: &PublicKey) -> Result { match self.pk_map.get(pk.as_bytes()) { Some(peer) => Ok(peer.psk), _ => Err(ConfigError::new("No such public key")), -- cgit v1.2.3-59-g8ed1b