Add a rustls-tls-native-roots feature

Adds an optional cargo feature to load certificates
from the OS native certificate store.
This commit is contained in:
est31
2020-10-16 19:56:27 +02:00
committed by Sean McArthur
parent 3ea9f92f24
commit 23aaa0b60e
4 changed files with 21 additions and 2 deletions

View File

@@ -18,7 +18,10 @@ async fn test_badssl_modern() {
assert!(text.contains("<title>mozilla-modern.badssl.com</title>"));
}
#[cfg(feature = "rustls-tls-webpki-roots")]
#[cfg(any(
feature = "rustls-tls-webpki-roots",
feature = "rustls-tls-native-roots"
))]
#[tokio::test]
async fn test_rustls_badssl_modern() {
let text = reqwest::Client::builder()