Skip to content

Commit

Permalink
chore: replace trust-dns-resolver with hickory-resolver
Browse files Browse the repository at this point in the history
For security vulnerability

ID: RUSTSEC-2024-0421
Advisory: https://rustsec.org/advisories/RUSTSEC-2024-0421
  • Loading branch information
doitian committed Dec 18, 2024
1 parent 3166f21 commit ce7a013
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 69 deletions.
105 changes: 47 additions & 58 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions network/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ sentry = { version = "0.34.0", optional = true }
faster-hex = { version = "0.6", optional = true }
ckb-hash = { path = "../util/hash", version = "= 0.121.0-pre" }
secp256k1 = { version = "0.30", features = ["recovery"], optional = true }
trust-dns-resolver = { version = "0.23", optional = true }
hickory-resolver = { version = "0.24.2", optional = true }
snap = "1"
ckb-types = { path = "../util/types", version = "= 0.121.0-pre" }
ipnetwork = "0.20"
Expand All @@ -38,26 +38,26 @@ p2p = { version = "0.6.2", package = "tentacle", default-features = false }

[target.'cfg(not(target_family = "wasm"))'.dependencies]
p2p = { version = "0.6.2", package = "tentacle", default-features = false, features = [
"upnp",
"parking_lot",
"openssl-vendored",
"tokio-runtime",
"tokio-timer",
"ws",
"upnp",
"parking_lot",
"openssl-vendored",
"tokio-runtime",
"tokio-timer",
"ws",
] }
socket2 = "0.5"

[target.'cfg(target_family = "wasm")'.dependencies]
p2p = { version = "0.6.2", package = "tentacle", default-features = false, features = [
"wasm-timer",
"wasm-timer",
] }
idb = "0.6"
serde-wasm-bindgen = "0.6.5"


[features]
with_sentry = ["sentry"]
with_dns_seeding = ["bs58", "faster-hex", "trust-dns-resolver", "secp256k1"]
with_dns_seeding = ["bs58", "faster-hex", "hickory-resolver", "secp256k1"]
fuzz = []

[dev-dependencies]
Expand All @@ -66,7 +66,7 @@ criterion = "0.5"
proptest = "1.0"
num_cpus = "1.10"
ckb-systemtime = { path = "../util/systemtime", version = "= 0.121.0-pre", features = [
"enable_faketime",
"enable_faketime",
] }

[[bench]]
Expand Down
2 changes: 1 addition & 1 deletion network/src/services/dns_seeding/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl DnsSeedingService {
let pubkey = PublicKey::from_slice(&pubkey_bytes)
.map_err(|err| format!("create PublicKey failed: {err:?}"))?;

let resolver = trust_dns_resolver::AsyncResolver::tokio_from_system_conf()
let resolver = hickory_resolver::AsyncResolver::tokio_from_system_conf()
.map_err(|err| format!("Failed to create DNS resolver: {err}"))?;

let mut addrs = Vec::new();
Expand Down

0 comments on commit ce7a013

Please sign in to comment.