Support to rustls 0.20 (#1388)

This commit is contained in:
Biagio Festa
2021-11-29 21:25:57 +01:00
committed by GitHub
parent 8fe22c4885
commit 8b37ae4b15
5 changed files with 148 additions and 113 deletions

View File

@@ -246,7 +246,11 @@ fn use_preconfigured_native_tls_default() {
fn use_preconfigured_rustls_default() {
extern crate rustls;
let tls = rustls::ClientConfig::new();
let root_cert_store = rustls::RootCertStore::empty();
let tls = rustls::ClientConfig::builder()
.with_safe_defaults()
.with_root_certificates(root_cert_store)
.with_no_client_auth();
reqwest::Client::builder()
.use_preconfigured_tls(tls)