pub struct Bundle { /* private fields */ }Expand description
An X.509 bundle contains the X.509 authorities for a trust domain.
Implementations§
Source§impl Bundle
impl Bundle
Sourcepub fn new(trust_domain: TrustDomain) -> Bundle
pub fn new(trust_domain: TrustDomain) -> Bundle
Creates a new empty Bundle for the given trust domain.
Creates a new Bundle for the given trust domain and authorities.
Sourcepub fn load(trust_domain: TrustDomain, path: &str) -> Result<Bundle>
pub fn load(trust_domain: TrustDomain, path: &str) -> Result<Bundle>
Loads an X.509 bundle from a PEM encoded file.
Sourcepub fn read(trust_domain: TrustDomain, reader: &mut dyn Read) -> Result<Bundle>
pub fn read(trust_domain: TrustDomain, reader: &mut dyn Read) -> Result<Bundle>
Reads an X.509 bundle from a reader.
Sourcepub fn parse(trust_domain: TrustDomain, bytes: &[u8]) -> Result<Bundle>
pub fn parse(trust_domain: TrustDomain, bytes: &[u8]) -> Result<Bundle>
Parses an X.509 bundle from PEM encoded bytes.
Sourcepub fn parse_raw(trust_domain: TrustDomain, bytes: &[u8]) -> Result<Bundle>
pub fn parse_raw(trust_domain: TrustDomain, bytes: &[u8]) -> Result<Bundle>
Parses an X.509 bundle from DER encoded bytes.
Sourcepub fn trust_domain(&self) -> TrustDomain
pub fn trust_domain(&self) -> TrustDomain
Returns the trust domain of the bundle.
Returns the X.509 authorities in the bundle, DER encoded.
Adds an X.509 authority to the bundle.
Removes an X.509 authority from the bundle.
Returns true if the bundle has the given X.509 authority.
Sets the X.509 authorities in the bundle.
Sourcepub fn equal(&self, other: &Bundle) -> bool
pub fn equal(&self, other: &Bundle) -> bool
Returns true if this bundle is equal to another bundle.
Sourcepub fn clone_bundle(&self) -> Bundle
pub fn clone_bundle(&self) -> Bundle
Clones the bundle.
Sourcepub fn get_x509_bundle_for_trust_domain(
&self,
trust_domain: TrustDomain,
) -> Result<Bundle>
pub fn get_x509_bundle_for_trust_domain( &self, trust_domain: TrustDomain, ) -> Result<Bundle>
Returns the bundle for the given trust domain if it matches.
Trait Implementations§
Source§impl Source for Bundle
impl Source for Bundle
Source§fn get_x509_bundle_for_trust_domain(
&self,
trust_domain: TrustDomain,
) -> Result<Bundle>
fn get_x509_bundle_for_trust_domain( &self, trust_domain: TrustDomain, ) -> Result<Bundle>
Auto Trait Implementations§
impl !Freeze for Bundle
impl RefUnwindSafe for Bundle
impl Send for Bundle
impl Sync for Bundle
impl Unpin for Bundle
impl UnwindSafe for Bundle
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> 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