[][src]Struct rustls_extra::TlsServerConfiguration

pub struct TlsServerConfiguration {
    pub common: TlsCommonConfiguration,
    pub tls_maximum_sessions_to_store_in_memory: usize,
    pub certificate_chain_and_private_key: CertificateChainAndPrivateKey,
    pub client_authentication_configuration: ClientAuthenticationConfiguration,
    pub online_certificate_status_protocol_file: Option<PathBuf>,
    pub signed_certificate_timestamp_list_file: Option<PathBuf>,
}

TLS configuration for a server.

TLS is implemented using the rustls TLS library.

Note that it is not possible to configure which cipher suites are used; rustls chooses a minimal, currently known to be secure set with a preference for CHA-CHA.

Fields

common: TlsCommonConfiguration

Configuration common to clients and servers.

tls_maximum_sessions_to_store_in_memory: usize

Maximum number of TLS sessions to store in memory.

If zero no sessions are stored.

certificate_chain_and_private_key: CertificateChainAndPrivateKey

Certificate chain.

client_authentication_configuration: ClientAuthenticationConfiguration

Location of certificate authorities for client certificates if used.

online_certificate_status_protocol_file: Option<PathBuf>

Online Certificate Status Protocol (OCSP) file, if any.

signed_certificate_timestamp_list_file: Option<PathBuf>

Signed Certificate Timestamp List (SCT) file, if any.

Methods

impl TlsServerConfiguration[src]

pub fn new(
    certificate_chain_and_private_key: CertificateChainAndPrivateKey,
    client_authentication_configuration: ClientAuthenticationConfiguration
) -> Self
[src]

Similar to a default() but permits specifying client authentication configuration and the location of the server's certificate chain and private keys.

application_layer_protocol_negotiation_protocols must not contain ApplicationLayerProtocolNegotiationProtocol::HTTP_2_over_TCP or a panic will occur when creating the server configuration.

pub fn server_configuration(
    &self
) -> Result<Arc<ServerConfig>, TlsServerConfigurationError>
[src]

Create server configuration.

pub const fn default_tls_maximum_sessions_to_store_in_memory() -> usize[src]

Defaults to 256.

pub fn default_online_certificate_status_protocol_file() -> Option<PathBuf>[src]

Defaults to None.

pub fn default_signed_certificate_timestamp_list_file() -> Option<PathBuf>[src]

Defaults to None.

Trait Implementations

impl PartialEq<TlsServerConfiguration> for TlsServerConfiguration[src]

impl Debug for TlsServerConfiguration[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

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

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

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

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]