pub struct ServerCertVerifier { /* private fields */ }
Expand description
Server certificate verifier.
Implementations§
Source§impl ServerCertVerifier
impl ServerCertVerifier
Sourcepub fn new(roots: &RootCertStore) -> Result<Self, ServerCertVerifierError>
pub fn new(roots: &RootCertStore) -> Result<Self, ServerCertVerifierError>
Creates a new server certificate verifier.
Sourcepub fn mozilla() -> Self
pub fn mozilla() -> Self
Creates a new server certificate verifier with Mozilla root certificates.
Sourcepub fn verify_server_cert(
&self,
end_entity: &CertificateDer,
intermediates: &[CertificateDer],
server_name: &ServerName,
time: u64,
) -> Result<(), ServerCertVerifierError>
pub fn verify_server_cert( &self, end_entity: &CertificateDer, intermediates: &[CertificateDer], server_name: &ServerName, time: u64, ) -> Result<(), ServerCertVerifierError>
Verifies the server certificate was valid at the given time of presentation.
§Arguments
end_entity
- End-entity certificate to verify.intermediates
- Intermediate certificates to a trust anchor.server_name
- Server DNS name.time
- Unix time the certificate was presented.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ServerCertVerifier
impl RefUnwindSafe for ServerCertVerifier
impl Send for ServerCertVerifier
impl Sync for ServerCertVerifier
impl Unpin for ServerCertVerifier
impl UnwindSafe for ServerCertVerifier
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more