WIP: TUN IO worker

Also removed the type parameters from the handshake device.
This commit is contained in:
Mathias Hall-Andersen
2019-09-18 15:31:10 +02:00
parent dfe4a22920
commit 6311aa3402
6 changed files with 217 additions and 134 deletions

View File

@@ -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