aboutsummaryrefslogtreecommitdiffstats
path: root/src/handshake/types.rs
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2019-09-18 15:31:10 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2019-09-18 15:31:10 +0200
commit6311aa34022a24224b1dc8d0427cd72dd42e9396 (patch)
tree234937066c4429838dff270e944e95d32e58a862 /src/handshake/types.rs
parentWIP: Work on handshake worker (diff)
downloadwireguard-rs-6311aa34022a24224b1dc8d0427cd72dd42e9396.tar.xz
wireguard-rs-6311aa34022a24224b1dc8d0427cd72dd42e9396.zip
WIP: TUN IO worker
Also removed the type parameters from the handshake device.
Diffstat (limited to '')
-rw-r--r--src/handshake/types.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/handshake/types.rs b/src/handshake/types.rs
index 7b190ec..ba71ec4 100644
--- a/src/handshake/types.rs
+++ b/src/handshake/types.rs
@@ -1,6 +1,8 @@
use std::error::Error;
use std::fmt;
+use x25519_dalek::PublicKey;
+
use crate::types::KeyPair;
/* Internal types for the noise IKpsk2 implementation */
@@ -77,10 +79,10 @@ impl Error for HandshakeError {
}
}
-pub type Output<T> = (
- Option<T>, // external identifier associated with peer
- Option<Vec<u8>>, // message to send
- Option<KeyPair>, // resulting key-pair of successful handshake
+pub type Output = (
+ Option<PublicKey>, // external identifier associated with peer
+ Option<Vec<u8>>, // message to send
+ Option<KeyPair>, // resulting key-pair of successful handshake
);
// preshared key