#[non_exhaustive]pub struct ClientTls {
pub root: Vec<PathBuf>,
pub identity: Option<PathBuf>,
pub disable_verify: Option<bool>,
}Expand description
TLS configuration for the client.
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.root: Vec<PathBuf>Use the TLS root at this path, encoded as PEM.
This value can be provided multiple times for multiple roots. If this is empty, system roots will be used instead
identity: Option<PathBuf>Present a client certificate during the TLS handshake (mTLS).
The path must point at a single PEM file containing both the
certificate chain and the matching private key (in any order). This
is the same bundle layout used by curl’s --cert and many PKI tools.
disable_verify: Option<bool>Danger: Disable TLS certificate verification.
Fine for local development and between relays, but should be used in caution in production.
Implementations§
Source§impl ClientTls
impl ClientTls
Sourcepub fn build(&self) -> Result<ClientConfig>
pub fn build(&self) -> Result<ClientConfig>
Build a rustls::ClientConfig from this configuration.
Loads the configured roots (or the platform’s native roots if none),
optionally attaches a client identity for mTLS, and disables server
certificate verification when disable_verify is set.
Sourcepub fn identity_dns_name(&self) -> Result<Option<String>>
pub fn identity_dns_name(&self) -> Result<Option<String>>
Parse the configured identity PEM (if any) and return the first DNS SAN on its leaf certificate.
Useful for sanity-checking that a caller’s own cluster node name
matches the identity they will present. Returns Ok(None) if no
identity is configured.
Trait Implementations§
Source§impl Args for ClientTls
impl Args for ClientTls
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 ClientTls
impl<'de> Deserialize<'de> for ClientTls
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 ClientTls
impl FromArgMatches for ClientTls
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.