/// Add a trusted certificate authority.
///
/// For more advanced/less secure certificate verification, construct a [`ClientConfig`]
/// manually and use rustls's `dangerous_configuration` feature to override the certificate
/// verifier.
Add a trusted certificate authority.
For more advanced/less secure certificate verification, construct a [`ClientConfig`]
manually and use rustls's `dangerous_configuration` feature to override the certificate
verifier.
Add a trusted certificate authority . For more advanced / less secure certificate verification construct a [ ` ClientConfig ` ] manually and use rustls ' s ` dangerous_configuration ` feature to override the certificate verifier .
pub fn add_certificate_authority(
        &mut self,
        cert: Certificate,
    ) -> Result<&mut Self, webpki::Error> {
        let anchor = webpki::trust_anchor_util::cert_der_as_trust_anchor(&cert.inner.0)?;
        Arc::make_mut(&mut self.config.crypto)
            .root_store
            .add_server_trust_anchors(&webpki::TLSServerTrustAnchors(&[anchor]));
        Ok(self)
    }
pub fn add_certificate_authority ( & mut self , cert : Certificate , ) -> Result < & mut Self , webpki :: Error > { let anchor = webpki :: trust_anchor_util :: cert_der_as_trust_anchor ( & cert . inner . 0 ) ? ; Arc :: make_mut ( & mut self . config . crypto ) . root_store . add_server_trust_anchors ( & webpki :: TLSServerTrustAnchors ( & [ anchor ] ) ) ; Ok ( self ) }
Add a trusted certificate authority.
Add a trusted certificate authority .
&mut self
cert
Certificate