Struct rustls::RootCertStore [−][src]
pub struct RootCertStore {
pub roots: Vec<OwnedTrustAnchor>,
}A container for root certificates able to provide a root-of-trust for connection authentication.
Fields
roots: Vec<OwnedTrustAnchor>
The list of roots.
Methods
impl RootCertStore[src]
impl RootCertStorepub fn empty() -> RootCertStore[src]
pub fn empty() -> RootCertStoreMake a new, empty RootCertStore.
pub fn is_empty(&self) -> bool[src]
pub fn is_empty(&self) -> boolReturn true if there are no certificates.
pub fn len(&self) -> usize[src]
pub fn len(&self) -> usizeSay how many certificates are in the container.
pub fn get_subjects(&self) -> DistinguishedNames[src]
pub fn get_subjects(&self) -> DistinguishedNamesReturn the Subject Names for certificates in the container.
pub fn add(&mut self, der: &Certificate) -> Result<(), Error>[src]
pub fn add(&mut self, der: &Certificate) -> Result<(), Error>Add a single DER-encoded certificate to the store.
pub fn add_server_trust_anchors(
&mut self,
webpki::TLSServerTrustAnchors: &TLSServerTrustAnchors
)[src]
pub fn add_server_trust_anchors(
&mut self,
webpki::TLSServerTrustAnchors: &TLSServerTrustAnchors
)Adds all the given TrustAnchors anchors. This does not
fail.
pub fn add_pem_file(&mut self, rd: &mut BufRead) -> Result<(usize, usize), ()>[src]
pub fn add_pem_file(&mut self, rd: &mut BufRead) -> Result<(usize, usize), ()>Parse a PEM file and add all certificates found inside.
Errors are non-specific; they may be io errors in rd and
PEM format errors, but not certificate validity errors.
This is because large collections of root certificates often include ancient or syntactically invalid certificates. CAs are competent like that.
Returns the number of certificates added, and the number which were extracted from the PEM but ultimately unsuitable.
Trait Implementations
impl Debug for RootCertStore[src]
impl Debug for RootCertStorefn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Clone for RootCertStore[src]
impl Clone for RootCertStorefn clone(&self) -> RootCertStore[src]
fn clone(&self) -> RootCertStoreReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
Auto Trait Implementations
impl Send for RootCertStore
impl Send for RootCertStoreimpl Sync for RootCertStore
impl Sync for RootCertStore