diff --git a/.github/workflows/ci-post-merge.yml b/.github/workflows/ci-post-merge.yml index 5460eeec4..a34dd27ba 100644 --- a/.github/workflows/ci-post-merge.yml +++ b/.github/workflows/ci-post-merge.yml @@ -58,7 +58,7 @@ jobs: run: | cargo test --lib --tests -p=actix-router --all-features cargo test --lib --tests -p=actix-http --all-features - cargo test --lib --tests -p=actix-web --features=rustls,openssl -- --skip=test_reading_deflate_encoding_large_random_rustls + cargo test --lib --tests -p=actix-web --features=rustls-0_20,rustls-0_21,openssl -- --skip=test_reading_deflate_encoding_large_random_rustls cargo test --lib --tests -p=actix-web-codegen --all-features cargo test --lib --tests -p=awc --all-features cargo test --lib --tests -p=actix-http-test --all-features diff --git a/awc/src/client/connector.rs b/awc/src/client/connector.rs index 538b64ffd..1a8715bf9 100644 --- a/awc/src/client/connector.rs +++ b/awc/src/client/connector.rs @@ -109,33 +109,10 @@ impl Connector<()> { OurTlsConnector::Rustls021(std::sync::Arc::new(config)) } - /// Build TLS connector with Rustls v0.21, based on supplied ALPN protocols - /// - /// Note that if other TLS crate features are enabled, Rustls v0.21 will be used. - #[cfg(all( - all(feature = "rustls-0_20", feature = "openssl"), - not(feature = "rustls-0_21"), - ))] - fn build_tls(protocols: Vec>) -> OurTlsConnector { - use actix_tls::connect::rustls_0_20::{reexports::ClientConfig, webpki_roots_cert_store}; - - let mut config = ClientConfig::builder() - .with_safe_defaults() - .with_root_certificates(webpki_roots_cert_store()) - .with_no_client_auth(); - - config.alpn_protocols = protocols; - - OurTlsConnector::Rustls020(std::sync::Arc::new(config)) - } - /// Build TLS connector with Rustls v0.20, based on supplied ALPN protocols /// /// Note that if other TLS crate features are enabled, Rustls v0.21 will be used. - #[cfg(all( - feature = "rustls-0_20", - not(any(feature = "rustls-0_21", feature = "openssl")), - ))] + #[cfg(all(feature = "rustls-0_20", not(feature = "rustls-0_21")))] fn build_tls(protocols: Vec>) -> OurTlsConnector { use actix_tls::connect::rustls_0_20::{reexports::ClientConfig, webpki_roots_cert_store};