From 1c52e301a12c05e98835bc89922e6af4aa477b50 Mon Sep 17 00:00:00 2001 From: Ayush Jha Date: Mon, 18 Dec 2023 12:16:41 +0545 Subject: [PATCH] Don't use native TLS feature in tokio tungstenite --- Cargo.lock | 19 ++++++++++++++++--- lib/registry/Cargo.toml | 2 +- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 93b3a1d6a31..bf2a21dc672 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3823,6 +3823,18 @@ dependencies = [ "sct", ] +[[package]] +name = "rustls-native-certs" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "schannel", + "security-framework", +] + [[package]] name = "rustls-pemfile" version = "1.0.3" @@ -4747,9 +4759,10 @@ checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" dependencies = [ "futures-util", "log", - "native-tls", + "rustls", + "rustls-native-certs", "tokio", - "tokio-native-tls", + "tokio-rustls", "tungstenite", ] @@ -5026,8 +5039,8 @@ dependencies = [ "http", "httparse", "log", - "native-tls", "rand", + "rustls", "sha1", "thiserror", "url", diff --git a/lib/registry/Cargo.toml b/lib/registry/Cargo.toml index 703a5f77f41..b4f1b06d0c9 100644 --- a/lib/registry/Cargo.toml +++ b/lib/registry/Cargo.toml @@ -44,7 +44,7 @@ thiserror = "1.0.37" time = { version = "0.3.17", default-features = false, features = ["parsing", "std", "formatting"], optional = true } tldextract = "0.6.0" tokio = "1" -tokio-tungstenite = {version = "0.20", features = ["native-tls"]} +tokio-tungstenite = {version = "0.20", features = ["rustls-tls-native-roots"]} toml = "0.5.9" tracing = "0.1.40" url = "2.3.1"