pub struct ServerConfig { /* private fields */ }
Expand description
Configuration for a server-side QUIC. Wraps around a BoringSSL SslContext.
Implementations§
Source§impl Config
impl Config
pub fn new() -> Result<Self>
Sourcepub fn ctx(&self) -> &SslContext
pub fn ctx(&self) -> &SslContext
Returns the underlying SslContext backing all created sessions.
Sourcepub fn ctx_mut(&mut self) -> &mut SslContext
pub fn ctx_mut(&mut self) -> &mut SslContext
Returns the underlying SslContext backing all created sessions. Wherever possible use the provided methods to modify settings rather than accessing this directly.
Care should be taken to avoid overriding required behavior. In particular, this configuration will set callbacks for QUIC events, alpn selection, server name, as well as info and key logging.
Sourcepub fn verify_peer(&mut self, verify: bool)
pub fn verify_peer(&mut self, verify: bool)
Sets whether or not the peer certificate should be verified. If true
, any error
during verification will be fatal. If not called, verification of the client is
disabled by default.
Sourcepub fn set_alpn(&mut self, alpn_protocols: &[Vec<u8>]) -> Result<()>
pub fn set_alpn(&mut self, alpn_protocols: &[Vec<u8>]) -> Result<()>
Sets the ALPN protocols that will be accepted by the server. QUIC requires that ALPN be used (see https://www.rfc-editor.org/rfc/rfc9001.html#section-8.1).
If this method is not called, the server will default to accepting “h3”.
Sourcepub fn set_key_log(&mut self, key_log: Option<Arc<dyn KeyLog>>)
pub fn set_key_log(&mut self, key_log: Option<Arc<dyn KeyLog>>)
Sets the key logger.