Struct ServerTrustSnapshot
pub struct ServerTrustSnapshot { /* private fields */ }tls only.Expand description
The server trust that applies to one handshake.
Reading a snapshot pins the trust generation of a reloadable source.
Backends cache what they build from it under Self::key.
Implementations§
§impl ServerTrustSnapshot
impl ServerTrustSnapshot
pub fn read(
trust: &TlsServerTrust,
) -> Result<ServerTrustSnapshot, Box<dyn Error + Send + Sync>>
Available on crate feature boring only.
pub fn read( trust: &TlsServerTrust, ) -> Result<ServerTrustSnapshot, Box<dyn Error + Send + Sync>>
boring only.Read the trust for one handshake. This can block on trust-store IO.
pub async fn read_async(
trust: &TlsServerTrust,
) -> Result<ServerTrustSnapshot, Box<dyn Error + Send + Sync>>
Available on crate feature boring only.
pub async fn read_async( trust: &TlsServerTrust, ) -> Result<ServerTrustSnapshot, Box<dyn Error + Send + Sync>>
boring only.Read the trust for one handshake, running trust-store IO on a blocking worker.
pub fn read_ready(trust: &TlsServerTrust) -> Option<ServerTrustSnapshot>
Available on crate feature boring only.
pub fn read_ready(trust: &TlsServerTrust) -> Option<ServerTrustSnapshot>
boring only.Read the trust for one handshake only if that needs no trust-store IO.
None when a reload trigger event, the age limit or a failed refresh
requires a fresh read, which Self::read performs.
Available on crate feature boring only.
boring only.The process-wide trust material that applies unchanged to trust.
Unlike Self::read, this never reads a trust store.
Available on crate feature boring only.
boring only.The process-wide trust material when it applies unchanged.
pub fn roots(&self) -> &ServerTrustRoots
Available on crate feature boring only.
pub fn roots(&self) -> &ServerTrustRoots
boring only.The roots to derive verification from.
pub fn additional_anchors(&self) -> Option<&TlsServerTrustAnchors>
Available on crate feature boring only.
pub fn additional_anchors(&self) -> Option<&TlsServerTrustAnchors>
boring only.Anchors added to Self::roots.
pub fn key(&self) -> ServerTrustKey
Available on crate feature boring only.
pub fn key(&self) -> ServerTrustKey
boring only.The cache key of the verification derived from this snapshot.
pub fn platform_verifier(
&self,
) -> Result<Arc<PlatformVerifier>, Box<dyn Error + Send + Sync>>
Available on crate feature boring only.
pub fn platform_verifier( &self, ) -> Result<Arc<PlatformVerifier>, Box<dyn Error + Send + Sync>>
boring only.Build the operating system verifier for SharedServerTrustRoots::Platform
or ServerTrustRoots::PlatformExtras roots.
It trusts the extra roots and additional anchors on top of the operating system’s trust; other roots contribute nothing. This can block while reading extra roots.
Trait Implementations§
§impl Clone for ServerTrustSnapshot
impl Clone for ServerTrustSnapshot
§fn clone(&self) -> ServerTrustSnapshot
fn clone(&self) -> ServerTrustSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Forget for ServerTrustSnapshot
impl Freeze for ServerTrustSnapshotwhere
*const ArcInner<[CertificateDer<'static>]> is !null: Freeze,
PhantomData<ArcInner<[CertificateDer<'static>]>>: Freeze,
impl Move for ServerTrustSnapshot
impl RefUnwindSafe for ServerTrustSnapshot
impl Send for ServerTrustSnapshot
impl Sync for ServerTrustSnapshot
impl Unpin for ServerTrustSnapshot
impl UnsafeUnpin for ServerTrustSnapshotwhere
*const ArcInner<[CertificateDer<'static>]> is !null: UnsafeUnpin,
PhantomData<ArcInner<[CertificateDer<'static>]>>: UnsafeUnpin,
impl UnwindSafe for ServerTrustSnapshot
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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
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<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a rama_grpc::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more