Struct TrustAnchor
pub struct TrustAnchor<'a> {
pub subject: Der<'a>,
pub subject_public_key_info: Der<'a>,
pub name_constraints: Option<Der<'a>>,
}
Expand description
A trust anchor (a.k.a. root CA)
Traditionally, certificate verification libraries have represented trust anchors as full X.509
root certificates. However, those certificates contain a lot more data than is needed for
verifying certificates. The TrustAnchor
representation allows an application to store
just the essential elements of trust anchors.
The most common way to get one of these is to call rustls_webpki::anchor_from_trusted_cert()
.
Fields§
§subject: Der<'a>
Value of the subject
field of the trust anchor
subject_public_key_info: Der<'a>
Value of the subjectPublicKeyInfo
field of the trust anchor
name_constraints: Option<Der<'a>>
Value of DER-encoded NameConstraints
, containing name constraints to the trust anchor, if any
Implementations§
§impl TrustAnchor<'_>
impl TrustAnchor<'_>
pub fn to_owned(&self) -> TrustAnchor<'static>
pub fn to_owned(&self) -> TrustAnchor<'static>
Yield a 'static
lifetime of the TrustAnchor
by allocating owned Der
variants
Trait Implementations§
§impl<'a> Clone for TrustAnchor<'a>
impl<'a> Clone for TrustAnchor<'a>
§fn clone(&self) -> TrustAnchor<'a>
fn clone(&self) -> TrustAnchor<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl<'a> Debug for TrustAnchor<'a>
impl<'a> Debug for TrustAnchor<'a>
§impl Extend<TrustAnchor<'static>> for RootCertStore
impl Extend<TrustAnchor<'static>> for RootCertStore
§fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = TrustAnchor<'static>>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = TrustAnchor<'static>>,
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
§impl<'a> From<Cert<'a>> for TrustAnchor<'a>
impl<'a> From<Cert<'a>> for TrustAnchor<'a>
§fn from(cert: Cert<'a>) -> TrustAnchor<'a>
fn from(cert: Cert<'a>) -> TrustAnchor<'a>
Converts to this type from the input type.
§impl FromIterator<TrustAnchor<'static>> for RootCertStore
impl FromIterator<TrustAnchor<'static>> for RootCertStore
§fn from_iter<T>(iter: T) -> RootCertStorewhere
T: IntoIterator<Item = TrustAnchor<'static>>,
fn from_iter<T>(iter: T) -> RootCertStorewhere
T: IntoIterator<Item = TrustAnchor<'static>>,
Creates a value from an iterator. Read more
§impl<'a> PartialEq for TrustAnchor<'a>
impl<'a> PartialEq for TrustAnchor<'a>
impl<'a> Eq for TrustAnchor<'a>
impl<'a> StructuralPartialEq for TrustAnchor<'a>
Auto Trait Implementations§
impl<'a> Freeze for TrustAnchor<'a>
impl<'a> RefUnwindSafe for TrustAnchor<'a>
impl<'a> Send for TrustAnchor<'a>
impl<'a> Sync for TrustAnchor<'a>
impl<'a> Unpin for TrustAnchor<'a>
impl<'a> UnwindSafe for TrustAnchor<'a>
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
Mutably borrows from an owned value. Read more
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
Compare self to
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
Checks if this value is equivalent to the given key. Read more
§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> ⓘ
Converts
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> ⓘ
Converts
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> 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>
Create a new
Policy
that returns Action::Follow
only if self
and other
return
Action::Follow
. Read more