Struct wolfssl::SessionConfig
source · pub struct SessionConfig<IOCB: IOCallbacks> {
pub io: IOCB,
pub dtls_use_nonblock: Option<bool>,
pub dtls_mtu: Option<u16>,
pub server_name_indicator: Option<String>,
pub checked_domain_name: Option<String>,
pub keyshare_group: Option<CurveGroup>,
pub dtls13_allow_ch_frag: Option<bool>,
pub ssl_verify_mode: Option<SslVerifyMode>,
}Expand description
Stores configurations we want to initialize a Session with.
Fields§
§io: IOCBI/O callback handlers
dtls_use_nonblock: Option<bool>If set and the session is DTLS, sets the nonblocking mode.
dtls_mtu: Option<u16>If set and the session is DTLS, sets the MTU of the session.
If value exceeds wolfSSL’s MAX_RECORD_SIZE (currently 2^14), or
is 0, ignored.
server_name_indicator: Option<String>If set, configures SNI (Server Name Indication) for the session with the given hostname.
checked_domain_name: Option<String>If set, configures the session to check the given domain against the peer certificate during connection.
If set, specifies a curve group to use for key share
dtls13_allow_ch_frag: Option<bool>If set, specifies if fragmented ClientHello (CH) is allowed
ssl_verify_mode: Option<SslVerifyMode>SSL Verify mode
Implementations§
source§impl<IOCB: IOCallbacks> SessionConfig<IOCB>
impl<IOCB: IOCallbacks> SessionConfig<IOCB>
sourcepub fn new(io: IOCB) -> Self
pub fn new(io: IOCB) -> Self
Creates a default Self. A set of IO callbacks implementing
IOCallbacks must be provided.
sourcepub fn when<F>(self, cond: bool, func: F) -> Selfwhere
F: FnOnce(Self) -> Self,
pub fn when<F>(self, cond: bool, func: F) -> Selfwhere
F: FnOnce(Self) -> Self,
When cond is True call func on Self
sourcepub fn when_some<F, T>(self, maybe: Option<T>, func: F) -> Selfwhere
F: FnOnce(Self, T) -> Self,
pub fn when_some<F, T>(self, maybe: Option<T>, func: F) -> Selfwhere
F: FnOnce(Self, T) -> Self,
When maybe is Some(_) call func on Self and the contained value
sourcepub fn with_dtls_nonblocking(self, is_nonblocking: bool) -> Self
pub fn with_dtls_nonblocking(self, is_nonblocking: bool) -> Self
sourcepub fn with_dtls13_allow_ch_frag(self, allow: bool) -> Self
pub fn with_dtls13_allow_ch_frag(self, allow: bool) -> Self
sourcepub fn with_dtls_mtu(self, mtu: u16) -> Self
pub fn with_dtls_mtu(self, mtu: u16) -> Self
Sets Self::dtls_mtu
sourcepub fn with_checked_domain_name(self, domain: &str) -> Self
pub fn with_checked_domain_name(self, domain: &str) -> Self
Sets Self::keyshare_group