You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting Illegal SNI hostname received [49, 48, 46, 48, 46, 48, 46, 52] when hooking up a server to a legacy system.
This is my configuration:
let tls_cfg = {
// Load public certificate.
let server_cert = X509::stack_from_pem(server_cert.as_bytes()).unwrap();
let mut server_certs: Vec<Certificate> = Vec::new();
for x509 in server_cert {
let certificate = tokio_rustls::rustls::Certificate(x509.to_der().unwrap());
server_certs.push(certificate);
}
// Load private key.
let server_key = pem_parser::pem_to_der(server_key);
let server_key = tokio_rustls::rustls::PrivateKey(server_key);
// Do not use client certificate authentication.
let mut cfg = ServerConfig::builder()
.with_safe_defaults()
.with_no_client_auth()
.with_single_cert(server_certs, server_key)
.unwrap();
// Configure ALPN to accept HTTP/2, HTTP/1.1 in that order.
//cfg.alpn_protocols = vec![b"h2".to_vec(), b"http/1.1".to_vec()];
sync::Arc::new(cfg)
};
let acceptor = tokio_rustls::TlsAcceptor::from(tls_cfg);
let client_stream = acceptor.accept_with(client_stream, session).await.unwrap();
Is there a way to ignore that illegal SNI message since I cannot change the code the generates it?
The text was updated successfully, but these errors were encountered:
I am getting Illegal SNI hostname received [49, 48, 46, 48, 46, 48, 46, 52] when hooking up a server to a legacy system.
This is my configuration:
Is there a way to ignore that illegal SNI message since I cannot change the code the generates it?
The text was updated successfully, but these errors were encountered: