Skip to content

Instantly share code, notes, and snippets.

@doroved
doroved / sni.rs
Last active December 7, 2024 18:47
Disabling Server Name Verification in Rustls (Version 0.23.19)
use rustls::{
client::{
danger::{HandshakeSignatureValid, ServerCertVerified, ServerCertVerifier},
WebPkiServerVerifier,
},
pki_types::{CertificateDer, ServerName, UnixTime},
DigitallySignedStruct,
};
use std::sync::Arc;