pub struct X509Bundle { /* private fields */ }
Expand description
This type contains a collection of trusted X.509 authorities for a TrustDomain
.
Implementations§
Source§impl X509Bundle
impl X509Bundle
Sourcepub fn new(trust_domain: TrustDomain) -> Self
pub fn new(trust_domain: TrustDomain) -> Self
Creates an emtpy X509Bundle
for the given TrustDomain
.
Creates a bundle from a slice of X.509 authorities as ASN.1 DER-encoded data (binary format).
§Arguments
authorities
- ASN.1 DER-encoded data (binary format) representing a list X.509 authorities.
§Error
If the function cannot parse the inputs, a X509BundleError
variant will be returned.
Sourcepub fn parse_from_der(
trust_domain: TrustDomain,
bundle_der: &[u8],
) -> Result<Self, X509BundleError>
pub fn parse_from_der( trust_domain: TrustDomain, bundle_der: &[u8], ) -> Result<Self, X509BundleError>
Parses a bundle from ASN.1 DER-encoded data (binary format) representing a list of X.509 authorities.
§Arguments
trust_domain
- ATrustDomain
to associate to the bundle.bundle_der
- ASN.1 DER-encoded data (binary format) representing a list of X.509 authorities.
§Error
If the function cannot parse the inputs, a X509BundleError
variant will be returned.
Adds an X.509 authority as ASN.1 DER-encoded data (binary format)to the bundle.
It verifies that the authorities_bytes
represents a valid DER-encoded X.509 certificate.
§Arguments
authority_bytes
- ASN.1 DER-encoded data (binary format) representing a X.509 authority.
§Error
If the function cannot parse the inputs, a X509BundleError
variant will be returned.
Sourcepub fn trust_domain(&self) -> &TrustDomain
pub fn trust_domain(&self) -> &TrustDomain
Returns the TrustDomain
associated to the bundle.
Returns the X.509 authorities in the bundle.
Trait Implementations§
Source§impl Clone for X509Bundle
impl Clone for X509Bundle
Source§fn clone(&self) -> X509Bundle
fn clone(&self) -> X509Bundle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for X509Bundle
impl Debug for X509Bundle
Source§impl PartialEq for X509Bundle
impl PartialEq for X509Bundle
impl Bundle for X509Bundle
impl Eq for X509Bundle
impl StructuralPartialEq for X509Bundle
Auto Trait Implementations§
impl Freeze for X509Bundle
impl RefUnwindSafe for X509Bundle
impl Send for X509Bundle
impl Sync for X509Bundle
impl Unpin for X509Bundle
impl UnwindSafe for X509Bundle
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request