Merge pull request #345 from mlemesle/fix/webpki-error-variant

Fix not compiling features rustls-tls-native-roots and rustls-tls-webpki-roots
pull/348/head
Daniel Abramov 2 years ago committed by GitHub
commit a873befaae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      Cargo.toml
  2. 2
      src/tls.rs

@ -55,6 +55,7 @@ version = "0.6.0"
[dependencies.webpki] [dependencies.webpki]
optional = true optional = true
version = "0.22" version = "0.22"
features = ["std"]
[dependencies.webpki-roots] [dependencies.webpki-roots]
optional = true optional = true

@ -107,7 +107,7 @@ mod encryption {
for cert in rustls_native_certs::load_native_certs()? { for cert in rustls_native_certs::load_native_certs()? {
root_store root_store
.add(&rustls::Certificate(cert.0)) .add(&rustls::Certificate(cert.0))
.map_err(TlsError::Webpki)?; .map_err(TlsError::Rustls)?;
} }
} }
#[cfg(feature = "rustls-tls-webpki-roots")] #[cfg(feature = "rustls-tls-webpki-roots")]

Loading…
Cancel
Save