feat: make tokio-rustls-native-certs preferred, disallow enabling both at the same time

Co-authored-by: Sebastian Dröge <slomo@coaxion.net>
pull/91/head
Yusuf Bera Ertan 4 years ago committed by GitHub
parent 0194f80272
commit 7c593a9db9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/tokio/rustls.rs

@ -41,7 +41,7 @@ where
config.root_store = config.root_store =
rustls_native_certs::load_native_certs().map_err(|(_, err)| err)?; rustls_native_certs::load_native_certs().map_err(|(_, err)| err)?;
} }
#[cfg(feature = "tokio-rustls-webpki-roots")] #[cfg(all(feature = "tokio-rustls-webpki-roots", not(feature = "tokio-rustls-native-certs"))]
config config
.root_store .root_store
.add_server_trust_anchors(&webpki_roots::TLS_SERVER_ROOTS); .add_server_trust_anchors(&webpki_roots::TLS_SERVER_ROOTS);

Loading…
Cancel
Save