wip: support rustls-0.23 for http3-quinn

This commit is contained in:
Jun Kurihara 2024-05-28 21:39:38 +09:00
commit 234abae5dd
No known key found for this signature in database
GPG key ID: 48ADFD173ED22B03
10 changed files with 63 additions and 53 deletions

View file

@ -24,6 +24,9 @@ pub struct BackendApp {
/// tls settings: https redirection with 30x
#[builder(default)]
pub https_redirection: Option<bool>,
/// tls settings: mutual TLS is enabled
#[builder(default)]
pub mutual_tls: Option<bool>,
}
impl<'a> BackendAppBuilder {
pub fn server_name(&mut self, server_name: impl Into<Cow<'a, str>>) -> &mut Self {
@ -56,7 +59,10 @@ impl TryFrom<&AppConfig> for BackendApp {
backend_builder.build()?
} else {
let tls = app_config.tls.as_ref().unwrap();
backend_builder.https_redirection(Some(tls.https_redirection)).build()?
backend_builder
.https_redirection(Some(tls.https_redirection))
.mutual_tls(Some(tls.mutual_tls))
.build()?
};
Ok(backend)
}