Enum ServerTrustSource
pub enum ServerTrustSource {
Native,
WebPki,
Custom(TlsServerTrustAnchors),
Platform,
}tls only.Expand description
Source of trust for normal server-certificate verification.
Variants§
Native
A snapshot of the native roots, or the roots in SSL_CERT_FILE and
SSL_CERT_DIR, which replace them. Bundled WebPKI roots are the
fallback only without such an override. Roots in SSL_CERT_EXTRA_FILE
and SSL_CERT_EXTRA_DIR are always added.
WebPki
Rama’s bundled Mozilla (CCADB) roots, independent of the host OS.
Custom(TlsServerTrustAnchors)
Only the supplied trust anchors.
Platform
The operating system’s certificate verifier validates the chain and
server identity, including enterprise trust settings and the platform’s
distrust and revocation policy. Roots in SSL_CERT_EXTRA_FILE and
SSL_CERT_EXTRA_DIR are trusted in addition; SSL_CERT_FILE and
SSL_CERT_DIR are ignored, as they replace a root store.
Available on Apple platforms, Windows and Android. Other platforms have
no such verifier and verify against ServerTrustSource::Native instead,
environment variables included.
On Android it needs an initialized ndk-context; without one every
verification fails.
Native verification may block on network access and is not cancellable.
Boring runs it on Tokio’s blocking pool. rustls verifies synchronously:
it uses block_in_place on a multithread runtime and runs inline on a
current-thread runtime. A handshake timeout cannot preempt this call;
current-thread executors can be stalled until native verification returns.
Bound concurrent connections and size the blocking pool for native work;
handshake deadlines alone do not bound running platform verifications.
This matters especially for relays whose clients choose upstream hosts
and can steer certificate AIA or OCSP fetches to slow endpoints.
See rama_crypto::platform_verifier for revocation and Android limits.
Trait Implementations§
§impl Clone for ServerTrustSource
impl Clone for ServerTrustSource
§fn clone(&self) -> ServerTrustSource
fn clone(&self) -> ServerTrustSource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for ServerTrustSource
impl Debug for ServerTrustSource
§impl Default for ServerTrustSource
impl Default for ServerTrustSource
§fn default() -> ServerTrustSource
fn default() -> ServerTrustSource
impl Eq for ServerTrustSource
§impl Hash for ServerTrustSource
impl Hash for ServerTrustSource
§impl PartialEq for ServerTrustSource
impl PartialEq for ServerTrustSource
impl StructuralPartialEq for ServerTrustSource
Auto Trait Implementations§
impl Freeze for ServerTrustSource
impl RefUnwindSafe for ServerTrustSource
impl Send for ServerTrustSource
impl Sync for ServerTrustSource
impl Unpin for ServerTrustSource
impl UnsafeUnpin for ServerTrustSource
impl UnwindSafe for ServerTrustSource
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<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
§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.§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
§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