#[non_exhaustive]pub enum ServerHandshake {
NeedsInput(NeedsInput<ServerSide>),
Accepted(Accepted),
VerifyClientIdentity(VerifyPeerIdentity<ServerSide>),
Complete(SplitConnection<ServerSide>),
}Expand description
An in-progress TLS server handshake.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NeedsInput(NeedsInput<ServerSide>)
More data needs to be received to make progress.
Accepted(Accepted)
A complete ClientHello has been received.
The handshake can be progressed by choosing a ServerConfig based on
Accepted::client_hello() and providing it to Accepted::choose_config().
VerifyClientIdentity(VerifyPeerIdentity<ServerSide>)
The client’s presented identity must be verified.
See VerifyPeerIdentity for how to proceed.
Complete(SplitConnection<ServerSide>)
The handshake is complete.
Now see SplitConnection to continue the connection.
Implementations§
Source§impl ServerHandshake
impl ServerHandshake
Sourcepub fn start() -> NeedsInput<ServerSide>
pub fn start() -> NeedsInput<ServerSide>
Creates a new ServerHandshake via the payload of the ServerHandshake::NeedsInput variant.
It is a fundamental fact of server TLS connections that the server reads first; this is reflected in the returned type.
You may wrap this in the ServerHandshake::NeedsInput variant to generalise the type to a
ServerHandshake.
The returned object should be fed data from a single potential client.