Struct salvo::listener::rustls::RustlsConfig [−][src]
pub struct RustlsConfig { /* fields omitted */ }
Expand description
Builder to set the configuration for the Tls server.
Implementations
Create new RustlsConfig
sets the Tls key via File Path, returns Error::IoError
if the file cannot be open
sets the Tls key via bytes slice
Specify the file path for the TLS certificate to use.
sets the Tls certificate via bytes slice
Sets the trust anchor for optional Tls client authentication via file path.
Anonymous and authenticated clients will be accepted. If no trust anchor is provided by any
of the client_auth_
methods, then client authentication is disabled by default.
pub fn with_client_auth_optional(
self,
trust_anchor: impl Into<Vec<u8, Global>>
) -> RustlsConfig
pub fn with_client_auth_optional(
self,
trust_anchor: impl Into<Vec<u8, Global>>
) -> RustlsConfig
Sets the trust anchor for optional Tls client authentication via bytes slice.
Anonymous and authenticated clients will be accepted. If no trust anchor is provided by any
of the client_auth_
methods, then client authentication is disabled by default.
Sets the trust anchor for required Tls client authentication via file path.
Only authenticated clients will be accepted. If no trust anchor is provided by any of the
client_auth_
methods, then client authentication is disabled by default.
pub fn with_client_auth_required(
self,
trust_anchor: impl Into<Vec<u8, Global>>
) -> RustlsConfig
pub fn with_client_auth_required(
self,
trust_anchor: impl Into<Vec<u8, Global>>
) -> RustlsConfig
Sets the trust anchor for required Tls client authentication via bytes slice.
Only authenticated clients will be accepted. If no trust anchor is provided by any of the
client_auth_
methods, then client authentication is disabled by default.
Sets the DER-encoded OCSP response
ServerConfig
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for RustlsConfig
impl Send for RustlsConfig
impl Sync for RustlsConfig
impl Unpin for RustlsConfig
impl !UnwindSafe for RustlsConfig
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more