downgrade webpki, use rusttls-native-certs instead of webpki-roots

pull/205/head
Yusuf Bera Ertan 4 years ago
parent 141a03df0d
commit d7e2f0a72a
No known key found for this signature in database
GPG Key ID: 1D8F8FAF2294D6EA
  1. 8
      Cargo.toml
  2. 5
      src/client.rs

@ -19,7 +19,7 @@ all-features = true
default = [] default = []
native-tls = ["native-tls-crate"] native-tls = ["native-tls-crate"]
native-tls-vendored = ["native-tls", "native-tls-crate/vendored"] native-tls-vendored = ["native-tls", "native-tls-crate/vendored"]
rustls-tls = ["rustls", "webpki", "webpki-roots"] rustls-tls = ["rustls", "webpki", "rustls-native-certs"]
[dependencies] [dependencies]
base64 = "0.13.0" base64 = "0.13.0"
@ -46,11 +46,11 @@ version = "0.19.0"
[dependencies.webpki] [dependencies.webpki]
optional = true optional = true
version = "0.22.0" version = "0.21"
[dependencies.webpki-roots] [dependencies.rustls-native-certs]
optional = true optional = true
version = "0.22.0" version = "0.5.0"
[dev-dependencies] [dev-dependencies]
env_logger = "0.8.1" env_logger = "0.8.1"

@ -72,7 +72,10 @@ mod encryption {
Mode::Tls => { Mode::Tls => {
let config = { let config = {
let mut config = ClientConfig::new(); let mut config = ClientConfig::new();
config.root_store.add_server_trust_anchors(&webpki_roots::TLS_SERVER_ROOTS); config.root_store = match rustls_native_certs::load_native_certs() {
Ok(store) => store,
Err((_, err)) => Err(err)?,
};
Arc::new(config) Arc::new(config)
}; };

Loading…
Cancel
Save