From bef2754c17f1c53d5ece7156bdaf3bc3cb6da8fd Mon Sep 17 00:00:00 2001 From: Simon Bernier St-Pierre Date: Sat, 22 Feb 2025 00:28:21 -0500 Subject: [PATCH] rustls: ring is no longer maintained, use aws-lc-rs --- Cargo.toml | 12 ++---------- tests/test_proxy.rs | 2 -- tests/tools/proxy.rs | 1 - 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0b3937a..1873611 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,11 +30,7 @@ multipart = { version = "0.18.0", default-features = false, features = [ ], optional = true } native-tls = { version = "0.2.10", optional = true } rustls-native-certs = { version = "0.8.1", optional = true } -rustls = { version = "0.23.22", default-features = false, features = [ - "ring", - "std", - "tls12", -], optional = true } +rustls = { version = "0.23.22", optional = true } serde = { version = "1.0.143", optional = true } serde_json = { version = "1.0.83", optional = true } serde_urlencoded = { version = "0.7.1", optional = true } @@ -54,11 +50,7 @@ lazy_static = "1.4.0" multipart = { version = "0.18.0", default-features = false, features = [ "server", ] } -rustls = { version = "0.23.22", default-features = false, features = [ - "ring", - "std", - "tls12", -] } +rustls = "0.23.22" tokio = { version = "1.20.1", features = ["full"] } tokio-rustls = "0.26.1" diff --git a/tests/test_proxy.rs b/tests/test_proxy.rs index f49c158..1dab65b 100644 --- a/tests/test_proxy.rs +++ b/tests/test_proxy.rs @@ -52,7 +52,6 @@ async fn test_http_url_with_https_proxy() -> Result<(), anyhow::Error> { #[cfg(any(feature = "tls-native", feature = "__rustls"))] #[tokio::test(flavor = "multi_thread")] async fn test_https_url_with_http_proxy() -> Result<(), anyhow::Error> { - rustls::crypto::ring::default_provider().install_default().unwrap(); let remote_port = tools::start_hello_world_server(true).await?; let remote_url = format!("https://localhost:{remote_port}"); @@ -77,7 +76,6 @@ async fn test_https_url_with_http_proxy() -> Result<(), anyhow::Error> { #[cfg(any(feature = "tls-native", feature = "__rustls"))] #[tokio::test(flavor = "multi_thread")] async fn test_https_url_with_https_proxy() -> Result<(), anyhow::Error> { - rustls::crypto::ring::default_provider().install_default().unwrap(); let remote_port = tools::start_hello_world_server(true).await?; let remote_url = format!("https://localhost:{remote_port}"); diff --git a/tests/tools/proxy.rs b/tests/tools/proxy.rs index b64188e..189984c 100644 --- a/tests/tools/proxy.rs +++ b/tests/tools/proxy.rs @@ -101,7 +101,6 @@ async fn tunnel(upgraded: Upgraded, addr: String) -> std::io::Result<()> { } async fn create_proxy(tls: bool, deny: bool) -> anyhow::Result { - let _ = rustls::crypto::ring::default_provider().install_default(); let addr = SocketAddr::from(([127, 0, 0, 1], 0)); let listener = TcpListener::bind(addr).await?; let port = listener.local_addr().unwrap().port();