Skip to content

Commit c58588a

Browse files
authored
Replace unmaintained webpki dependency with rustls-webpki (#54)
* fix deprecated use of add_server_trust_anchors fn * replace "webpki" with "rustls-webpki"
1 parent 97a5121 commit c58588a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Cargo.toml

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,13 @@ futures-io = "0.3.5"
2525
futures-core = "0.3.5"
2626
rustls = "0.21"
2727
rustls-pemfile = "1.0"
28-
webpki = { version = "0.22.0", optional = true }
28+
# webpki = { version = "0.22.0", optional = true }
29+
rustls-webpki = { version = "0.101.4", optional = true }
2930
webpki-roots = { version = "0.22.3", optional = true }
3031

3132
[features]
3233
default = ["client", "server"]
33-
client = ["webpki", "webpki-roots"]
34+
client = ["webpki-roots"]
3435
early-data = []
3536
server = []
3637

src/connector.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ impl From<ClientConfig> for TlsConnector {
6565
impl Default for TlsConnector {
6666
fn default() -> Self {
6767
let mut root_certs = RootCertStore::empty();
68-
root_certs.add_server_trust_anchors(webpki_roots::TLS_SERVER_ROOTS.0.iter().map(|ta| {
68+
root_certs.add_trust_anchors(webpki_roots::TLS_SERVER_ROOTS.0.iter().map(|ta| {
6969
OwnedTrustAnchor::from_subject_spki_name_constraints(
7070
ta.subject,
7171
ta.spki,

0 commit comments

Comments
 (0)