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. - Options to serve custom http_error page.
- Prometheus metrics - Prometheus metrics
- Documentation - 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. - etc.

View file

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