Skip to main content

TlsConfig

Trait TlsConfig 

Source
pub trait TlsConfig {
    // Required methods
    fn protocol_versions(&self) -> &[TlsVersion];
    fn alpn_protocols(&self) -> &[Vec<u8>];
    fn sni_name(&self) -> Option<&str>;

    // Provided method
    fn cipher_suites(&self) -> &[CipherSuite] { ... }
}
Expand description

A trait for generic introspection of TLS configuration.

Adapter crates implement this trait on their configuration structs to allow higher-level crates (e.g. oxitls, oxitls-h2) to read the effective parameters without depending on adapter-specific types.

Required Methods§

Source

fn protocol_versions(&self) -> &[TlsVersion]

The TLS protocol versions enabled by this configuration.

Source

fn alpn_protocols(&self) -> &[Vec<u8>]

The ALPN protocol identifiers advertised by this configuration, in preference order. Each entry is a raw byte string, e.g. b"h2".

Source

fn sni_name(&self) -> Option<&str>

The SNI server name, if any, used for this configuration.

Provided Methods§

Source

fn cipher_suites(&self) -> &[CipherSuite]

The cipher suites enabled by this configuration.

Returns an empty slice when the implementation does not constrain cipher selection (i.e. the provider default is used).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§