[edge] Device certificates as Caddy does them: no certificate on a device host fails the handshake, a Host other than the SNI name is 421; diff corpus gains six device cases
This commit is contained in:
@@ -121,10 +121,11 @@ pub fn server(shared: Arc<Shared>, opts: &Options) -> Result<Server, EdgeError>
|
||||
connector: Connector::new(None),
|
||||
},
|
||||
);
|
||||
let mut tls = TlsSettings::intermediate("", "").map_err(|e| EdgeError::Listen {
|
||||
address: rt.cfg.https_listen.clone(),
|
||||
reason: e.to_string(),
|
||||
})?;
|
||||
let mut tls =
|
||||
TlsSettings::with_callbacks(Box::new(tls::SniRecorder)).map_err(|e| EdgeError::Listen {
|
||||
address: rt.cfg.https_listen.clone(),
|
||||
reason: e.to_string(),
|
||||
})?;
|
||||
tls.set_cert_resolver(shared.certs.clone());
|
||||
tls.set_client_cert_verifier(shared.devices.clone());
|
||||
tls.enable_h2();
|
||||
|
||||
Reference in New Issue
Block a user