fn verify_server_cert(
        &self,
        end_entity: &Certificate,
        intermediates: &[Certificate],
        dns_name: webpki::DnsNameRef,
        scts: &mut dyn Iterator<Item = &[u8]>,
        ocsp_response: &[u8],
        now: SystemTime,
    ) -> Result<ServerCertVerified, Error> {
        let (cert, chain, trustroots) = prepare(end_entity, intermediates, &self.roots)?;
        let webpki_now = webpki::Time::try_from(now).map_err(|_| Error::FailedToGetCurrentTime)?;

        let cert = cert
            .verify_is_valid_tls_server_cert(
                SUPPORTED_SIG_ALGS,
                &webpki::TlsServerTrustAnchors(&trustroots),
                &chain,
                webpki_now,
            )
            .map_err(|e| Error::WebPkiError(e, WebPkiOp::ValidateServerCert))
            .map(|_| cert)?;

        verify_scts(end_entity, now, scts, &self.ct_logs)?;

        if !ocsp_response.is_empty() {
            trace!("Unvalidated OCSP response: {:?}", ocsp_response.to_vec());
        }

        cert.verify_is_valid_for_dns_name(dns_name)
            .map_err(|e| Error::WebPkiError(e, WebPkiOp::ValidateForDnsName))
            .map(|_| ServerCertVerified::assertion())
    }
/// Will verify the certificate is valid in the following ways:
/// - Signed by a  trusted `RootCertStore` CA
/// - Not Expired
/// - Valid for DNS entry
/// - OCSP data is present
Will verify the certificate is valid in the following ways:
Signed by a  trusted `RootCertStore` CA
Not Expired
Valid for DNS entry
OCSP data is present
Will verify the certificate is valid in the following ways : Signed by a trusted ` RootCertStore ` CA Not Expired Valid for DNS entry OCSP data is present
fn verify_server_cert(
        &self,
        end_entity: &Certificate,
        intermediates: &[Certificate],
        dns_name: webpki::DnsNameRef,
        scts: &mut dyn Iterator<Item = &[u8]>,
        ocsp_response: &[u8],
        now: SystemTime,
    ) -> Result<ServerCertVerified, Error> {
        let (cert, chain, trustroots) = prepare(end_entity, intermediates, &self.roots)?;
        let webpki_now = webpki::Time::try_from(now).map_err(|_| Error::FailedToGetCurrentTime)?;
        let cert = cert
            .verify_is_valid_tls_server_cert(
                SUPPORTED_SIG_ALGS,
                &webpki::TlsServerTrustAnchors(&trustroots),
                &chain,
                webpki_now,
            )
            .map_err(|e| Error::WebPkiError(e, WebPkiOp::ValidateServerCert))
            .map(|_| cert)?;
        verify_scts(end_entity, now, scts, &self.ct_logs)?;
        if !ocsp_response.is_empty() {
            trace!("Unvalidated OCSP response: {:?}", ocsp_response.to_vec());
        }
        cert.verify_is_valid_for_dns_name(dns_name)
            .map_err(|e| Error::WebPkiError(e, WebPkiOp::ValidateForDnsName))
            .map(|_| ServerCertVerified::assertion())
    }
fn verify_server_cert ( & self , end_entity : & Certificate , intermediates : & [ Certificate ] , dns_name : webpki :: DnsNameRef , scts : & mut dyn Iterator < Item = & [ u8 ] > , ocsp_response : & [ u8 ] , now : SystemTime , ) -> Result < ServerCertVerified , Error > { let ( cert , chain , trustroots ) = prepare ( end_entity , intermediates , & self . roots ) ? ; let webpki_now = webpki :: Time :: try_from ( now ) . map_err ( | _ | Error :: FailedToGetCurrentTime ) ? ; let cert = cert . verify_is_valid_tls_server_cert ( SUPPORTED_SIG_ALGS , & webpki :: TlsServerTrustAnchors ( & trustroots ) , & chain , webpki_now , ) . map_err ( | e | Error :: WebPkiError ( e , WebPkiOp :: ValidateServerCert ) ) . map ( | _ | cert ) ? ; verify_scts ( end_entity , now , scts , & self . ct_logs ) ? ; if ! ocsp_response . is_empty ( ) { trace ! ( " " ocsp_response to_vec ( ) ) ; } cert . verify_is_valid_for_dns_name ( dns_name ) . map_err ( | e | Error :: WebPkiError ( e , WebPkiOp :: ValidateForDnsName ) ) . map ( | _ | ServerCertVerified :: assertion ( ) ) }
Will verify the certificate is valid in the following ways:
 Signed by a  trusted `RootCertStore` CA
 Not Expired
 Valid for DNS entry
 OCSP data is present
Will verify the certificate is valid in the following ways : Signed by a trusted ` RootCertStore ` CA Not Expired Valid for DNS entry OCSP data is present
&self
end_entity
&Certificate
intermediates
&[Certificate]
dns_name
webpki::DnsNameRef
scts
&mut dyn Iterator<Item = &[u8]>
ocsp_response
&[u8]
now
SystemTime
&self
end_entity
&Certificate
intermediates
&[Certificate]
dns_name
webpki::DnsNameRef
scts
&mut dyn Iterator<Item = &[u8]>
ocsp_response
&[u8]
now
SystemTime