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

Co-authored-by: Sebastian Dröge <slomo@coaxion.net>
pull/93/head
Yusuf Bera Ertan 4 years ago committed by Sebastian Dröge
parent e89b49c16d
commit b0689b6520
  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