From 6dc2a0a8238d3fe629dd0f11fd6b240ff3877557 Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Thu, 1 Feb 2024 00:28:34 +1000 Subject: [PATCH] Fix: Load system-wide native cert on rustls (#1589) * Fix: Load system-wide native cert on rustls Signed-off-by: Jiahao XU * Update `Cargo.lock` Signed-off-by: Jiahao XU --------- Signed-off-by: Jiahao XU --- Cargo.lock | 13 +++++++++++++ crates/binstalk-downloader/Cargo.toml | 2 ++ 2 files changed, 15 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index b8f14547e..aeeae5586 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3172,6 +3172,7 @@ dependencies = [ "pin-project-lite", "quinn", "rustls", + "rustls-native-certs", "rustls-pemfile", "serde", "serde_json", @@ -3276,6 +3277,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.4" diff --git a/crates/binstalk-downloader/Cargo.toml b/crates/binstalk-downloader/Cargo.toml index dbc8c0c49..e86bc5613 100644 --- a/crates/binstalk-downloader/Cargo.toml +++ b/crates/binstalk-downloader/Cargo.toml @@ -66,6 +66,8 @@ rustls = [ "__tls", "reqwest/rustls-tls", + "reqwest/rustls-tls-webpki-roots", + "reqwest/rustls-tls-native-roots", # Enable the following features only if hickory-resolver is enabled. "hickory-resolver?/dns-over-rustls",