pub struct TlsClientConfig {
pub ca_cert_path: Option<PathBuf>,
pub client_cert_path: Option<PathBuf>,
pub client_key_path: Option<PathBuf>,
pub domain_name: Option<String>,
pub skip_verification: bool,
}Expand description
TLS configuration for the AQL client
Configures how the client establishes secure connections to servers. Supports server certificate verification (CA cert), mutual TLS (client cert + key), custom domain names, and a skip-verification flag for development use.
Fields§
§ca_cert_path: Option<PathBuf>Path to the CA certificate PEM file for server verification
client_cert_path: Option<PathBuf>Path to the client certificate PEM file for mTLS
client_key_path: Option<PathBuf>Path to the client private key PEM file for mTLS
domain_name: Option<String>Override the domain name used for TLS verification
skip_verification: boolSkip server certificate verification (development/testing only)
Implementations§
Source§impl TlsClientConfig
impl TlsClientConfig
Sourcepub fn with_ca_cert(self, path: impl Into<PathBuf>) -> Self
pub fn with_ca_cert(self, path: impl Into<PathBuf>) -> Self
Set the CA certificate path for server verification
Sourcepub fn with_client_identity(
self,
cert_path: impl Into<PathBuf>,
key_path: impl Into<PathBuf>,
) -> Self
pub fn with_client_identity( self, cert_path: impl Into<PathBuf>, key_path: impl Into<PathBuf>, ) -> Self
Set client certificate and key paths for mutual TLS
Sourcepub fn with_domain_name(self, domain: impl Into<String>) -> Self
pub fn with_domain_name(self, domain: impl Into<String>) -> Self
Set the domain name override for TLS verification
Sourcepub fn with_skip_verification(self, skip: bool) -> Self
pub fn with_skip_verification(self, skip: bool) -> Self
Enable skip verification mode (development/testing only)
WARNING: This disables server certificate verification and should never be used in production environments.
Sourcepub fn validate(&self) -> NetResult<()>
pub fn validate(&self) -> NetResult<()>
Validate the TLS configuration for consistency
Returns an error if the configuration is invalid, such as having a client certificate without a key or vice versa.
Sourcepub fn build_tonic_tls_config(&self) -> NetResult<ClientTlsConfig>
pub fn build_tonic_tls_config(&self) -> NetResult<ClientTlsConfig>
Build a tonic ClientTlsConfig from this configuration
Loads certificate and key files from disk and assembles the tonic TLS configuration object.
Trait Implementations§
Source§impl Clone for TlsClientConfig
impl Clone for TlsClientConfig
Source§fn clone(&self) -> TlsClientConfig
fn clone(&self) -> TlsClientConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TlsClientConfig
impl Debug for TlsClientConfig
Source§impl Default for TlsClientConfig
impl Default for TlsClientConfig
Source§fn default() -> TlsClientConfig
fn default() -> TlsClientConfig
Auto Trait Implementations§
impl Freeze for TlsClientConfig
impl RefUnwindSafe for TlsClientConfig
impl Send for TlsClientConfig
impl Sync for TlsClientConfig
impl Unpin for TlsClientConfig
impl UnsafeUnpin for TlsClientConfig
impl UnwindSafe for TlsClientConfig
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.