pub struct TrustStore { /* private fields */ }Expand description
Trust anchor store for root CAs
Implementations§
Source§impl TrustStore
impl TrustStore
Sourcepub fn add_anchor(&mut self, cert: X509Certificate)
pub fn add_anchor(&mut self, cert: X509Certificate)
Add a trusted root CA certificate
Sourcepub fn validate_chain(&self, chain: &[X509Certificate]) -> bool
pub fn validate_chain(&self, chain: &[X509Certificate]) -> bool
Validate a certificate chain against the trust store.
Returns true if the chain can be verified back to a trusted anchor via basic issuer/subject matching.
Sourcepub fn anchor_count(&self) -> usize
pub fn anchor_count(&self) -> usize
Number of trust anchors