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:
parent
416bf00888
commit
056d125cb2
4 changed files with 11 additions and 179 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue