pub struct CertificateChain(/* private fields */);Expand description
A CertificateChain chain of trust
These chains are what gets presented by TLS.
They consist of a number of X.509 Certificates,
from the source to a root of trust.
Implementations§
Source§impl CertificateChain
impl CertificateChain
pub fn from_pem_chain(input: &str) -> Result<Self, CertificateError>
pub fn as_pem_chain(&self) -> String
pub fn from_der_chain(input: &[Vec<u8>]) -> Result<Self, CertificateError>
pub fn verify_chain(&self) -> Result<(), CertificateError>
pub fn verify_chain_against_root( &self, root: &Certificate, ) -> Result<(), CertificateError>
pub fn cert(&self) -> &Certificate
pub fn root(&self) -> &Certificate
Sourcepub fn as_leaf_v1(
&self,
sct: &SignedCertificateTimestamp,
as_precert: bool,
) -> Result<MerkleTreeLeaf, CodecError>
pub fn as_leaf_v1( &self, sct: &SignedCertificateTimestamp, as_precert: bool, ) -> Result<MerkleTreeLeaf, CodecError>
§Arguments
-sct: The v1::SignedCertificateTimestamp for which the leaf should be generated
-as_precert: Whether the leaf should contain a precert entry or the certificate itself
§Note:
If the SCT was obtained by extracting it out of the Certificate itself
via Certificate::extract_scts_v1, then the corresponding leaf must be a precertificate and is_precert should
be set to true.
Trait Implementations§
Source§impl Clone for CertificateChain
impl Clone for CertificateChain
Source§fn clone(&self) -> CertificateChain
fn clone(&self) -> CertificateChain
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CertificateChain
impl Debug for CertificateChain
Source§impl From<Vec<Certificate>> for CertificateChain
impl From<Vec<Certificate>> for CertificateChain
Source§fn from(value: Vec<Certificate>) -> Self
fn from(value: Vec<Certificate>) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CertificateChain
impl PartialEq for CertificateChain
Source§fn eq(&self, other: &CertificateChain) -> bool
fn eq(&self, other: &CertificateChain) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for CertificateChain
impl StructuralPartialEq for CertificateChain
Auto Trait Implementations§
impl Freeze for CertificateChain
impl RefUnwindSafe for CertificateChain
impl Send for CertificateChain
impl Sync for CertificateChain
impl Unpin for CertificateChain
impl UnsafeUnpin for CertificateChain
impl UnwindSafe for CertificateChain
Blanket Implementations§
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,
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