Skip to content

Commit 1dcd041

Browse files
committed
fix: install default crypto provider
1 parent 6288e7e commit 1dcd041

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

Cargo.lock

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ uuid = { version = "1", default-features = false, features = ["v4"] }
7777
data-encoding = "2.9"
7878
flate2 = "1.1"
7979
protobuf-json-mapping = "3.7"
80+
rustls = { version = "0.23", features = ["aws-lc-rs"] }
8081

8182
# Eventually, this should use rustls-platform-verifier to unify the platform-specific dependencies
8283
# but currently, hyper-proxy2 and tokio-tungstenite do not support it.

core/src/http_client.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,11 @@ impl HttpClient {
145145

146146
fn try_create_hyper_client(proxy_url: Option<&Url>) -> Result<HyperClient, Error> {
147147
// configuring TLS is expensive and should be done once per process
148+
let _ = rustls::crypto::aws_lc_rs::default_provider()
149+
.install_default()
150+
.map_err(|e| {
151+
Error::internal(format!("unable to install default crypto provider: {e:?}"))
152+
});
148153

149154
// On supported platforms, use native roots
150155
#[cfg(any(target_os = "windows", target_os = "macos", target_os = "linux"))]

0 commit comments

Comments
 (0)