secio: Add NULL cipher and allow more configuration. (#468)

* Introduce NULL cipher and allow more configuration.

* Back to using the hash-code for handshake.

Using `Endpoint` would be incompatible with the existing protocol.

* Add comments.
This commit is contained in:
Toralf Wittner
2018-09-12 09:10:05 +02:00
committed by GitHub
parent 5ecdb71c29
commit 6a5681aed7
12 changed files with 320 additions and 122 deletions

View File

@ -35,7 +35,7 @@ pub enum SecioError {
HandshakeParsingFailure,
/// There is no protocol supported by both the local and remote hosts.
NoSupportIntersection(&'static str, String),
NoSupportIntersection,
/// Failed to generate nonce.
NonceGenerationFailed,
@ -73,7 +73,7 @@ impl error::Error for SecioError {
SecioError::HandshakeParsingFailure => {
"Failed to parse one of the handshake protobuf messages"
}
SecioError::NoSupportIntersection(_, _) => {
SecioError::NoSupportIntersection => {
"There is no protocol supported by both the local and remote hosts"
}
SecioError::NonceGenerationFailed => "Failed to generate nonce",