#[non_exhaustive]pub struct Server {
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.
In config files, each list field accepts either a single string or a TOML array.
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 reported via crate::Request::has_peer_certificate
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 and noq backends.
Implementations§
Source§impl Server
impl Server
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 Server
impl Args for Server
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<'de> Deserialize<'de> for Server
impl<'de> Deserialize<'de> for Server
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 Server
impl FromArgMatches for Server
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.