Certify certs downloaded from the web.

- Fixes #174.
This commit is contained in:
Justus Winter 2024-02-12 17:45:32 +01:00
parent 2824dce5d8
commit d9f9bf6ea2
No known key found for this signature in database
GPG Key ID: 686F55B4AB2B3386
3 changed files with 9 additions and 4 deletions

4
Cargo.lock generated
View File

@ -3025,9 +3025,9 @@ dependencies = [
[[package]]
name = "sequoia-cert-store"
version = "0.4.1"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9359ae25b815675b04c89216709c4c6cc6b7b4d4a0a5547f0f3635c3a1803a58"
checksum = "e0d58235b88e5518ca84a74462e07c4391cb9b3067dccfb9b4ed8a8fdad77299"
dependencies = [
"anyhow",
"crossbeam",

View File

@ -42,7 +42,7 @@ clap = { version = "4", features = ["derive", "env", "string", "wrap_help"] }
humantime = "2"
indicatif = "0.17"
itertools = ">=0.10, <0.13"
sequoia-cert-store = "0.4.1"
sequoia-cert-store = "0.4.2"
sequoia-wot = "0.9"
tempfile = "3.1"
tokio = { version = "1.13.1" }

View File

@ -524,7 +524,12 @@ impl Method {
}
Method::WKD => certd.shadow_ca_wkd()?,
Method::DANE => certd.shadow_ca_dane()?,
Method::Http(_) => return Ok(None),
Method::Http(url) =>
if let Some(r) = certd.shadow_ca_for_url(&url.to_string())? {
r
} else {
return Ok(None);
},
Method::CertStore => return Ok(None),
};