mirror of
https://github.com/librespot-org/librespot.git
synced 2025-10-03 09:49:31 +02:00
fix: install default crypto provider
This commit is contained in:
parent
6288e7e03c
commit
1dcd041070
3 changed files with 8 additions and 1 deletions
3
Cargo.lock
generated
3
Cargo.lock
generated
|
@ -1,6 +1,6 @@
|
||||||
# This file is automatically @generated by Cargo.
|
# This file is automatically @generated by Cargo.
|
||||||
# It is not intended for manual editing.
|
# It is not intended for manual editing.
|
||||||
version = 3
|
version = 4
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "addr2line"
|
name = "addr2line"
|
||||||
|
@ -2058,6 +2058,7 @@ dependencies = [
|
||||||
"rand 0.9.2",
|
"rand 0.9.2",
|
||||||
"rand_distr",
|
"rand_distr",
|
||||||
"rsa",
|
"rsa",
|
||||||
|
"rustls 0.23.31",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"sha1",
|
"sha1",
|
||||||
|
|
|
@ -77,6 +77,7 @@ uuid = { version = "1", default-features = false, features = ["v4"] }
|
||||||
data-encoding = "2.9"
|
data-encoding = "2.9"
|
||||||
flate2 = "1.1"
|
flate2 = "1.1"
|
||||||
protobuf-json-mapping = "3.7"
|
protobuf-json-mapping = "3.7"
|
||||||
|
rustls = { version = "0.23", features = ["aws-lc-rs"] }
|
||||||
|
|
||||||
# Eventually, this should use rustls-platform-verifier to unify the platform-specific dependencies
|
# Eventually, this should use rustls-platform-verifier to unify the platform-specific dependencies
|
||||||
# but currently, hyper-proxy2 and tokio-tungstenite do not support it.
|
# but currently, hyper-proxy2 and tokio-tungstenite do not support it.
|
||||||
|
|
|
@ -145,6 +145,11 @@ impl HttpClient {
|
||||||
|
|
||||||
fn try_create_hyper_client(proxy_url: Option<&Url>) -> Result<HyperClient, Error> {
|
fn try_create_hyper_client(proxy_url: Option<&Url>) -> Result<HyperClient, Error> {
|
||||||
// configuring TLS is expensive and should be done once per process
|
// configuring TLS is expensive and should be done once per process
|
||||||
|
let _ = rustls::crypto::aws_lc_rs::default_provider()
|
||||||
|
.install_default()
|
||||||
|
.map_err(|e| {
|
||||||
|
Error::internal(format!("unable to install default crypto provider: {e:?}"))
|
||||||
|
});
|
||||||
|
|
||||||
// On supported platforms, use native roots
|
// On supported platforms, use native roots
|
||||||
#[cfg(any(target_os = "windows", target_os = "macos", target_os = "linux"))]
|
#[cfg(any(target_os = "windows", target_os = "macos", target_os = "linux"))]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue