pub struct ChainVerifier { /* private fields */ }Expand description
A structure for verifying certificate chains.
This struct holds the root certificates and provides methods to verify certificate chains.
Implementations§
Source§impl ChainVerifier
impl ChainVerifier
Sourcepub fn verify(
&self,
leaf_certificate: &Vec<u8>,
intermediate_certificate: &Vec<u8>,
effective_date: Option<u64>,
) -> Result<Vec<u8>, ChainVerifierError>
pub fn verify( &self, leaf_certificate: &Vec<u8>, intermediate_certificate: &Vec<u8>, effective_date: Option<u64>, ) -> Result<Vec<u8>, ChainVerifierError>
Verifies a certificate pair (leaf and intermediate).
This method verifies a leaf certificate against an intermediate certificate. It performs various checks to ensure the validity and integrity of the certificates.
§Arguments
leaf_certificate: The leaf certificate as a byte slice.intermediate_certificate: The intermediate certificate as a byte slice.effective_date: An optional Unix timestamp representing the effective date for the chain validation.
§Returns
Ok(Vec<u8>): If the certificates are valid, it returns the public key data from the leaf certificate.Err(ChainVerifierError): If the verification fails for any reason, it returns aChainVerifierErrorenum. TODO: Implement issuer checking
Auto Trait Implementations§
impl Freeze for ChainVerifier
impl RefUnwindSafe for ChainVerifier
impl Send for ChainVerifier
impl Sync for ChainVerifier
impl Unpin for ChainVerifier
impl UnwindSafe for ChainVerifier
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