Skip to content

Commit

Permalink
Merge #117: Remove webpki and bump webpki-roots to v0.25
Browse files Browse the repository at this point in the history
a331ae8 Remove `webpki` and bump `webpki-roots` to `v0.25` (Yuki Kishimoto)

Pull request description:

  I noticed that `webpki` dependency is no longer maintained and that has a high severity vulnerability.
  This PR remove the `webpki` dependency and bump `webpki-roots` to v0.25

ACKs for top commit:
  notmandatory:
    ACK a331ae8

Tree-SHA512: 63e9498dc0d56a07e7dd09dd43ca9a924d7e9ebb09934f2c762e64c9ce163cd58edb4d1563db4eba18a0fdf22642cb7d801940baeb97b6ce5473970b739278d4
  • Loading branch information
notmandatory committed Dec 7, 2023
2 parents 8b31e5f + a331ae8 commit dacd772
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }

Expand All @@ -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"]
2 changes: 0 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/raw_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ impl RawClient<ElectrumSslStream> {
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,
Expand Down

0 comments on commit dacd772

Please sign in to comment.