Struct TlsProfile
pub struct TlsProfile { /* private fields */ }Expand description
Named TLS trust and optional client-identity profile for one instance.
A profile selects certificates; it never grants a destination. Its hosts
must each be inside the instance’s egress_hosts grant, which
EgressPolicy::with_tls_profiles enforces, and a request that selects it
still passes the ordinary grant check first. The profile holds references
into the instance’s secret config, never PEM bytes.
Implementations§
Source§impl TlsProfile
impl TlsProfile
Sourcepub fn new(
name: TlsProfileName,
hosts: &[String],
system_roots: bool,
custom_ca: Option<SecretPropertyRef>,
client_identity: Option<TlsClientIdentity>,
) -> Result<Self, EgressError>
pub fn new( name: TlsProfileName, hosts: &[String], system_roots: bool, custom_ca: Option<SecretPropertyRef>, client_identity: Option<TlsClientIdentity>, ) -> Result<Self, EgressError>
Create a named TLS profile.
hosts uses the strict egress grammar of egress_hosts.
§Errors
Returns EgressError if no destination is bound, a host pattern is
invalid, or neither system roots nor a custom CA supplies trust anchors.
Sourcepub fn name(&self) -> &TlsProfileName
pub fn name(&self) -> &TlsProfileName
Profile name a transport selects.
Sourcepub fn uses_system_roots(&self) -> bool
pub fn uses_system_roots(&self) -> bool
Whether the roots plugin HTTPS trusts are included.
Sourcepub fn custom_ca(&self) -> Option<&SecretPropertyRef>
pub fn custom_ca(&self) -> Option<&SecretPropertyRef>
Optional instance-secret property containing PEM CA certificates.
Sourcepub fn client_identity(&self) -> Option<&TlsClientIdentity>
pub fn client_identity(&self) -> Option<&TlsClientIdentity>
Optional instance-secret properties forming a client identity.
Trait Implementations§
Source§impl Clone for TlsProfile
impl Clone for TlsProfile
Source§fn clone(&self) -> TlsProfile
fn clone(&self) -> TlsProfile
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TlsProfile
impl Debug for TlsProfile
impl Eq for TlsProfile
Source§impl PartialEq for TlsProfile
impl PartialEq for TlsProfile
impl StructuralPartialEq for TlsProfile
Auto Trait Implementations§
impl Freeze for TlsProfile
impl RefUnwindSafe for TlsProfile
impl Send for TlsProfile
impl Sync for TlsProfile
impl Unpin for TlsProfile
impl UnsafeUnpin for TlsProfile
impl UnwindSafe for TlsProfile
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.