From a331ae80591065fb331c1c1599ff85078b5154a4 Mon Sep 17 00:00:00 2001 From: Yuki Kishimoto Date: Fri, 25 Aug 2023 12:17:38 +0200 Subject: [PATCH] Remove `webpki` and bump `webpki-roots` to `v0.25` --- Cargo.toml | 5 ++--- src/lib.rs | 2 -- src/raw_client.rs | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3c1a347..ddd14be 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,8 +26,7 @@ serde_json = { version = "^1.0" } # Optional dependencies openssl = { version = "0.10", optional = true } rustls = { version = "0.21", optional = true, features = ["dangerous_configuration"] } -webpki = { version = "0.22", optional = true } -webpki-roots = { version = "0.22", optional = true } +webpki-roots = { version = "0.25", optional = true } byteorder = { version = "1.0", optional = true } @@ -42,5 +41,5 @@ default = ["proxy", "use-rustls"] minimal = [] debug-calls = [] proxy = ["byteorder", "winapi", "libc"] -use-rustls = ["webpki", "webpki-roots", "rustls"] +use-rustls = ["webpki-roots", "rustls"] use-openssl = ["openssl"] diff --git a/src/lib.rs b/src/lib.rs index 269714f..d83e9ea 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -33,8 +33,6 @@ extern crate rustls; extern crate serde; extern crate serde_json; -#[cfg(any(feature = "use-rustls", feature = "default"))] -extern crate webpki; #[cfg(any(feature = "use-rustls", feature = "default"))] extern crate webpki_roots; diff --git a/src/raw_client.rs b/src/raw_client.rs index 550b8aa..697113a 100644 --- a/src/raw_client.rs +++ b/src/raw_client.rs @@ -365,7 +365,7 @@ impl RawClient { socket_addr.domain().ok_or(Error::MissingDomain)?; let mut store = RootCertStore::empty(); - store.add_server_trust_anchors(webpki_roots::TLS_SERVER_ROOTS.0.into_iter().map(|t| { + store.add_trust_anchors(webpki_roots::TLS_SERVER_ROOTS.into_iter().map(|t| { OwnedTrustAnchor::from_subject_spki_name_constraints( t.subject, t.spki,