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 RootCertStore
pub fn empty() -> RootCertStore
[src]
pub fn empty() -> RootCertStore
Make a new, empty RootCertStore
.
pub fn is_empty(&self) -> bool
[src]
pub fn is_empty(&self) -> bool
Return true if there are no certificates.
pub fn len(&self) -> usize
[src]
pub fn len(&self) -> usize
Say how many certificates are in the container.
pub fn get_subjects(&self) -> DistinguishedNames
[src]
pub fn get_subjects(&self) -> DistinguishedNames
Return 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 RootCertStore
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for RootCertStore
[src]
impl Clone for RootCertStore
fn clone(&self) -> RootCertStore
[src]
fn clone(&self) -> RootCertStore
Returns 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 RootCertStore
impl Sync for RootCertStore
impl Sync for RootCertStore