#[non_exhaustive]pub struct ServerTlsConfig {
pub cert: Vec<PathBuf>,
pub key: Vec<PathBuf>,
pub generate: Vec<String>,
pub root: Vec<PathBuf>,
}Expand description
TLS configuration for the server.
Certificate and keys must currently be files on disk. Alternatively, you can generate a self-signed certificate given a list of hostnames.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.cert: Vec<PathBuf>Load the given certificate from disk.
key: Vec<PathBuf>Load the given key from disk.
generate: Vec<String>Or generate a new certificate and key with the given hostnames. This won’t be valid unless the client uses the fingerprint or disables verification.
root: Vec<PathBuf>PEM file(s) of root CAs for validating optional client certificates (mTLS).
When set, clients may present a certificate during the TLS handshake.
Valid presentations are exposed via Request::peer_identity and can be
used by the application to grant elevated access. Clients that do not
present a certificate are unaffected.
Only supported by the Quinn backend.
Implementations§
Source§impl ServerTlsConfig
impl ServerTlsConfig
Sourcepub fn load_roots(&self) -> Result<RootCertStore>
pub fn load_roots(&self) -> Result<RootCertStore>
Load all configured root CAs into a rustls::RootCertStore.
Trait Implementations§
Source§impl Args for ServerTlsConfig
impl Args for ServerTlsConfig
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl Clone for ServerTlsConfig
impl Clone for ServerTlsConfig
Source§fn clone(&self) -> ServerTlsConfig
fn clone(&self) -> ServerTlsConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ServerTlsConfig
impl Debug for ServerTlsConfig
Source§impl Default for ServerTlsConfig
impl Default for ServerTlsConfig
Source§fn default() -> ServerTlsConfig
fn default() -> ServerTlsConfig
Source§impl<'de> Deserialize<'de> for ServerTlsConfig
impl<'de> Deserialize<'de> for ServerTlsConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl FromArgMatches for ServerTlsConfig
impl FromArgMatches for ServerTlsConfig
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.