1
0
Fork 0
mirror of https://github.com/librespot-org/librespot.git synced 2025-10-03 01:39:28 +02:00

refactor: move from native to webpki certs on all platforms

This commit is contained in:
Roderick van Domburg 2025-08-13 19:05:52 +02:00
parent 416bf00888
commit 056d125cb2
No known key found for this signature in database
GPG key ID: 607FA06CB5236AE0
4 changed files with 11 additions and 179 deletions

View file

@ -151,14 +151,7 @@ impl HttpClient {
Error::internal(format!("unable to install default crypto provider: {e:?}"))
});
// On supported platforms, use native roots
#[cfg(any(target_os = "windows", target_os = "macos", target_os = "linux"))]
let tls = HttpsConnectorBuilder::new().with_native_roots()?;
// Otherwise, use webpki roots
#[cfg(not(any(target_os = "windows", target_os = "macos", target_os = "linux")))]
let tls = HttpsConnectorBuilder::new().with_webpki_roots();
let https_connector = tls.https_or_http().enable_http1().enable_http2().build();
// When not using a proxy a dummy proxy is configured that will not intercept any traffic.