Trait quinn_proto::crypto::ServerConfig
source · [−]pub trait ServerConfig: Send + Sync {
fn initial_keys(
&self,
version: u32,
dst_cid: &ConnectionId,
side: Side
) -> Result<Keys, UnsupportedVersion>;
fn retry_tag(
&self,
version: u32,
orig_dst_cid: &ConnectionId,
packet: &[u8]
) -> [u8; 16];
fn start_session(
self: Arc<Self>,
version: u32,
params: &TransportParameters
) -> Box<dyn Session>;
}
Expand description
Server-side configuration for the crypto protocol
Required Methods
fn initial_keys(
&self,
version: u32,
dst_cid: &ConnectionId,
side: Side
) -> Result<Keys, UnsupportedVersion>
fn initial_keys(
&self,
version: u32,
dst_cid: &ConnectionId,
side: Side
) -> Result<Keys, UnsupportedVersion>
Create the initial set of keys given the client’s initial destination ConnectionId
Generate the integrity tag for a retry packet
Never called if initial_keys
rejected version
.
fn start_session(
self: Arc<Self>,
version: u32,
params: &TransportParameters
) -> Box<dyn Session>
fn start_session(
self: Arc<Self>,
version: u32,
params: &TransportParameters
) -> Box<dyn Session>
Start a server session with this configuration
Never called if initial_keys
rejected version
.