#[non_exhaustive]pub enum ServerHandshake {
NeedsInput(NeedsInput),
Accepted(Accepted),
VerifyClientIdentity(VerifyClientIdentity),
Complete(ServerConnection),
}Expand description
An in-progress TLS server handshake.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NeedsInput(NeedsInput)
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(VerifyClientIdentity)
The client’s presented identity must be verified.
See VerifyClientIdentity for how to proceed.
Complete(ServerConnection)
The handshake is complete.
Implementations§
Source§impl ServerHandshake
impl ServerHandshake
Sourcepub fn start(version: Version) -> NeedsInput
pub fn start(version: Version) -> NeedsInput
Creates a new QUIC 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.