pub struct CertificatePool { /* private fields */ }Expand description
A pool of trusted root and intermediate certificates for verification
Implementations§
Source§impl CertificatePool
impl CertificatePool
Sourcepub fn from_embedded_trust_root() -> Result<Self, CertVerificationError>
pub fn from_embedded_trust_root() -> Result<Self, CertVerificationError>
Load the default Fulcio trusted roots from embedded trusted_root.json
Sourcepub fn from_trusted_root(
trusted_root: TrustedRoot,
) -> Result<Self, CertVerificationError>
pub fn from_trusted_root( trusted_root: TrustedRoot, ) -> Result<Self, CertVerificationError>
Create a certificate pool from a TrustedRoot structure
Sourcepub fn verify_pem_cert(
&self,
cert_pem: &[u8],
integrated_time: i64,
) -> Result<(), CertVerificationError>
pub fn verify_pem_cert( &self, cert_pem: &[u8], integrated_time: i64, ) -> Result<(), CertVerificationError>
Verify a certificate chain from a PEM-encoded certificate
§Arguments
cert_pem- PEM-encoded certificate (leaf certificate)integrated_time- Unix timestamp when signature was created (from Rekor)
§Security
This performs full RFC 5280 path validation including:
- Signature verification at each level
- Validity period checking
- Key usage validation
- Chain building up to trusted root
Sourcepub fn verify_der_cert(
&self,
cert_der: &[u8],
integrated_time: i64,
) -> Result<(), CertVerificationError>
pub fn verify_der_cert( &self, cert_der: &[u8], integrated_time: i64, ) -> Result<(), CertVerificationError>
Verify a certificate chain from DER-encoded certificate
Auto Trait Implementations§
impl Freeze for CertificatePool
impl RefUnwindSafe for CertificatePool
impl Send for CertificatePool
impl Sync for CertificatePool
impl Unpin for CertificatePool
impl UnwindSafe for CertificatePool
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
Mutably borrows from an owned value. Read more