From 2f6bef691b5906585d9c80d9b7180495e5ed2387 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Wed, 20 Oct 2021 01:11:29 +0100 Subject: [PATCH] fix alpn test --- actix-http/tests/test_rustls.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/actix-http/tests/test_rustls.rs b/actix-http/tests/test_rustls.rs index 32e25940e..69c7db74d 100644 --- a/actix-http/tests/test_rustls.rs +++ b/actix-http/tests/test_rustls.rs @@ -58,11 +58,16 @@ fn tls_config() -> RustlsServerConfig { .collect(); let mut keys = pkcs8_private_keys(key_file).unwrap(); - RustlsServerConfig::builder() + let mut config = RustlsServerConfig::builder() .with_safe_defaults() .with_no_client_auth() .with_single_cert(cert_chain, PrivateKey(keys.remove(0))) - .unwrap() + .unwrap(); + + config.alpn_protocols.push(HTTP1_1_ALPN_PROTOCOL.to_vec()); + config.alpn_protocols.push(H2_ALPN_PROTOCOL.to_vec()); + + config } pub fn get_negotiated_alpn_protocol(