pub struct TlsConfig {
pub enabled: bool,
pub verify_peer: bool,
pub ca_cert_path: Option<String>,
pub client_cert_path: Option<String>,
pub client_key_path: Option<String>,
pub insecure: bool,
pub strict: bool,
}Expand description
TLS configuration for HTTP/HTTPS client connections.
Fields§
§enabled: boolEnables TLS customization for client connections.
verify_peer: boolVerifies peer certificates when true. Defaults to true.
ca_cert_path: Option<String>Optional path to custom CA certificate bundle (PEM or DER).
client_cert_path: Option<String>Optional path to client certificate for mTLS (PEM).
client_key_path: Option<String>Optional path to client private key for mTLS (PEM).
insecure: boolIf true, skips certificate verification (discouraged).
strict: boolFail closed on CA/mTLS material load failures (audit 2026-08-31 R3 /
rc-ayrwk). Default false keeps the back-compat behavior: a failed
CA read/parse falls back to system roots and a failed mTLS identity
load drops the client certificate, each with a loud warn! (F2-7).
When true, any failure to read or parse the configured CA bundle or
mTLS cert/key pair fails endpoint creation instead of degrading —
no silent downgrade path. Material is validated eagerly at endpoint
creation; file drift after creation still surfaces through the F2-7
warns. The CA bundle must be PEM with at least one parseable
CERTIFICATE section (the rustls backend does not enforce lone-DER
bundles); mTLS requires BOTH cert and key paths.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TlsConfig
impl<'de> Deserialize<'de> for TlsConfig
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>,
impl StructuralPartialEq for TlsConfig
Auto Trait Implementations§
impl Freeze for TlsConfig
impl RefUnwindSafe for TlsConfig
impl Send for TlsConfig
impl Sync for TlsConfig
impl Unpin for TlsConfig
impl UnsafeUnpin for TlsConfig
impl UnwindSafe for TlsConfig
Blanket Implementations§
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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 more