Struct rustls::ServerConfig[][src]

pub struct ServerConfig {
    pub ignore_client_order: bool,
    pub max_fragment_size: Option<usize>,
    pub session_storage: Arc<dyn StoresServerSessions + Send + Sync>,
    pub ticketer: Arc<dyn ProducesTickets>,
    pub cert_resolver: Arc<dyn ResolvesServerCert>,
    pub alpn_protocols: Vec<Vec<u8>>,
    pub key_log: Arc<dyn KeyLog>,
    // some fields omitted
}
Expand description

Common configuration for a set of server sessions.

Making one of these can be expensive, and should be once per process rather than once per connection.

These must be created via the ServerConfig::builder() function.

Defaults

Fields

ignore_client_order: bool

Ignore the client’s ciphersuite order. Instead, choose the top ciphersuite in the server list which is supported by the client.

max_fragment_size: Option<usize>

The maximum size of TLS message we’ll emit. If None, we don’t limit TLS message lengths except to the 2**16 limit specified in the standard.

rustls enforces an arbitrary minimum of 32 bytes for this field. Out of range values are reported as errors from ServerConnection::new.

Setting this value to the TCP MSS may improve latency for stream-y workloads.

session_storage: Arc<dyn StoresServerSessions + Send + Sync>

How to store client sessions.

ticketer: Arc<dyn ProducesTickets>

How to produce tickets.

cert_resolver: Arc<dyn ResolvesServerCert>

How to choose a server cert and key.

alpn_protocols: Vec<Vec<u8>>

Protocol names we support, most preferred first. If empty we don’t do ALPN at all.

key_log: Arc<dyn KeyLog>

How to output key material for debugging. The default does nothing.

Implementations

Create builder to build up the server configuration.

For more information, see the ConfigBuilder documentation.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.