pub trait ServerConfig: Send + Sync {
// Required methods
fn initial_keys(
&self,
version: u32,
dst_cid: &ConnectionId,
) -> 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§
Sourcefn initial_keys(
&self,
version: u32,
dst_cid: &ConnectionId,
) -> Result<Keys, UnsupportedVersion>
fn initial_keys( &self, version: u32, dst_cid: &ConnectionId, ) -> Result<Keys, UnsupportedVersion>
Create the initial set of keys given the client’s initial destination ConnectionId
Sourcefn retry_tag(
&self,
version: u32,
orig_dst_cid: &ConnectionId,
packet: &[u8],
) -> [u8; 16]
fn retry_tag( &self, version: u32, orig_dst_cid: &ConnectionId, packet: &[u8], ) -> [u8; 16]
Generate the integrity tag for a retry packet
Never called if initial_keys
rejected version
.
Sourcefn 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
.