Skip to content

Commit

Permalink
Update dev-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
djc committed Aug 12, 2023
1 parent 0dfe5c1 commit bc13b9a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ rustls-pemfile = "1"
[dev-dependencies]
ring = "0.16.5"
rustls = "0.21.0"
rustls-webpki = "0.100"
rustls-webpki = "0.101"
serial_test = "2"
untrusted = "0.7.0" # stick to the version ring depends on for now
webpki-roots = "0.23"
webpki-roots = "0.25"
x509-parser = "0.15"

[target.'cfg(windows)'.dependencies]
Expand Down
19 changes: 5 additions & 14 deletions tests/compare_mozilla.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,13 @@ fn stringify_x500name(subject: &[u8]) -> String {
parts.join(", ")
}

fn to_map<'a>(
anchors: &'a [webpki::TrustAnchor<'a>],
) -> HashMap<Vec<u8>, &'a webpki::TrustAnchor<'a>> {
let mut r = HashMap::new();

for anchor in anchors {
r.insert(anchor.spki.to_vec(), anchor);
}

r
}

#[test]
fn test_does_not_have_many_roots_unknown_by_mozilla() {
let native = rustls_native_certs::load_native_certs().unwrap();
let mozilla = to_map(webpki_roots::TLS_SERVER_ROOTS.0);
let mozilla = webpki_roots::TLS_SERVER_ROOTS
.iter()
.map(|ta| (ta.spki, ta))
.collect::<HashMap<_, _>>();

let mut missing_in_moz_roots = 0;

Expand Down Expand Up @@ -113,7 +104,7 @@ fn test_contains_most_roots_known_by_mozilla() {
}

let mut missing_in_native_roots = 0;
let mozilla = webpki_roots::TLS_SERVER_ROOTS.0;
let mozilla = webpki_roots::TLS_SERVER_ROOTS;
for cert in mozilla {
if native_map.get(cert.spki).is_none() {
println!(
Expand Down

0 comments on commit bc13b9a

Please sign in to comment.