1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-08-09 04:22:45 +03:00

Upgrade rustls

This commit is contained in:
Quentin Gliech
2024-02-02 10:42:03 +01:00
parent d01b8c36a6
commit aeca03a120
11 changed files with 60 additions and 62 deletions

View File

@@ -285,11 +285,8 @@ where
pub fn build_tls_server_config(config: &HttpTlsConfig) -> Result<ServerConfig, anyhow::Error> {
let (key, chain) = config.load()?;
let key = rustls::PrivateKey(key);
let chain = chain.into_iter().map(rustls::Certificate).collect();
let mut config = rustls::ServerConfig::builder()
.with_safe_defaults()
.with_no_client_auth()
.with_single_cert(chain, key)
.context("failed to build TLS server config")?;