workaround

This commit is contained in:
Jun Kurihara 2022-10-12 15:40:56 +09:00
commit 7e4f4d3488
No known key found for this signature in database
GPG key ID: 48ADFD173ED22B03
2 changed files with 18 additions and 10 deletions

View file

@ -7,5 +7,7 @@
- Options to serve custom http_error page.
- Prometheus metrics
- Documentation
- Client certificate -> support intermediate certificate. Currently, only supports client certificates directly signed by root CA.
- Client certificate
- support intermediate certificate. Currently, only supports client certificates directly signed by root CA.
- split rustls::server::ServerConfig for SNIs
- etc.

View file

@ -231,16 +231,22 @@ impl Backends {
// debug!("Load certificate chain for {} server_name's", cnt);
//////////////
let mut server_config = if client_ca_key_ids.is_empty() {
ServerConfig::builder()
.with_safe_defaults()
.with_no_client_auth()
.with_cert_resolver(Arc::new(resolver))
} else {
// TODO: Client Certs
let client_certs_verifier = rustls::server::AllowAnyAnonymousOrAuthenticatedClient::new(client_ca_roots);
// No ClientCert or WithClientCert
// let client_certs_verifier = rustls::server::AllowAnyAuthenticatedClient::new(client_ca_roots);
let mut server_config = ServerConfig::builder()
let client_certs_verifier = rustls::server::AllowAnyAnonymousOrAuthenticatedClient::new(client_ca_roots);
ServerConfig::builder()
.with_safe_defaults()
// .with_no_client_auth()
.with_client_cert_verifier(client_certs_verifier)
.with_cert_resolver(Arc::new(resolver));
.with_cert_resolver(Arc::new(resolver))
};
//////////////////////////////
#[cfg(feature = "http3")]