17 lines
492 B
Rust
17 lines
492 B
Rust
use rustls::{Certificate, RootCertStore, ServerCertVerified, ServerCertVerifier, TLSError};
|
|
use webpki;
|
|
|
|
pub struct NoCertificateVerification {}
|
|
|
|
impl ServerCertVerifier for NoCertificateVerification {
|
|
fn verify_server_cert(
|
|
&self,
|
|
_roots: &RootCertStore,
|
|
_presented_certs: &[Certificate],
|
|
_dns_name: webpki::DNSNameRef<'_>,
|
|
_ocsp_response: &[u8],
|
|
) -> Result<ServerCertVerified, TLSError> {
|
|
Ok(ServerCertVerified::assertion())
|
|
}
|
|
}
|