Use native tls as default tls backend, add features to use rustls or openssl instead

This commit is contained in:
bytedream 2023-09-21 13:46:23 +02:00
parent 185b65fc9b
commit 8eda8df3f7
6 changed files with 103 additions and 56 deletions

View file

@ -276,7 +276,7 @@ async fn crunchyroll_session(cli: &mut Cli) -> Result<Crunchyroll> {
builder = builder.user_agent(ua)
}
#[cfg(any(feature = "openssl", feature = "openssl-static"))]
#[cfg(any(feature = "openssl-tls", feature = "openssl-tls-static"))]
let client = {
let mut builder = builder.use_native_tls().tls_built_in_root_certs(false);
@ -288,7 +288,7 @@ async fn crunchyroll_session(cli: &mut Cli) -> Result<Crunchyroll> {
builder.build().unwrap()
};
#[cfg(not(any(feature = "openssl", feature = "openssl-static")))]
#[cfg(not(any(feature = "openssl-tls", feature = "openssl-tls-static")))]
let client = builder.build().unwrap();
client