Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump alpha dependency versions #81

Merged
merged 1 commit into from
Nov 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ repository = "https://github.com/rustls/rustls-native-certs"
categories = ["network-programming", "cryptography"]

[dependencies]
rustls-pemfile = "=2.0.0-alpha.1"
pki-types = { package = "rustls-pki-types", version = "0.2" }
rustls-pemfile = "=2.0.0-alpha.2"
pki-types = { package = "rustls-pki-types", version = "0.2.2" }

[dev-dependencies]
ring = "0.16.5"
rustls = "=0.22.0-alpha.3"
rustls-webpki = "=0.102.0-alpha.3"
rustls = "=0.22.0-alpha.5"
rustls-webpki = "=0.102.0-alpha.7"
serial_test = "2"
untrusted = "0.7.0" # stick to the version ring depends on for now
webpki-roots = "=0.26.0-alpha.1"
webpki-roots = "=0.26.0-alpha.2"
x509-parser = "0.15"

[target.'cfg(windows)'.dependencies]
Expand Down
8 changes: 4 additions & 4 deletions tests/compare_mozilla.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::collections::HashMap;

use pki_types::Der;
use ring::io::der;
use webpki::extract_trust_anchor;
use webpki::anchor_from_trusted_cert;

fn stringify_x500name(subject: &Der<'_>) -> String {
let mut parts = vec![];
Expand Down Expand Up @@ -64,7 +64,7 @@ fn test_does_not_have_many_roots_unknown_by_mozilla() {
let mut missing_in_moz_roots = 0;

for cert in &native {
let cert = extract_trust_anchor(&cert).unwrap();
let cert = anchor_from_trusted_cert(&cert).unwrap();
if let Some(moz) = mozilla.get(cert.subject_public_key_info.as_ref()) {
assert_eq!(cert.subject, moz.subject, "subjects differ for public key");
} else {
Expand Down Expand Up @@ -100,7 +100,7 @@ fn test_contains_most_roots_known_by_mozilla() {

let mut native_map = HashMap::new();
for anchor in &native {
let cert = extract_trust_anchor(&anchor).unwrap();
let cert = anchor_from_trusted_cert(&anchor).unwrap();
let spki = cert.subject_public_key_info.as_ref();
native_map.insert(spki.to_owned(), anchor);
}
Expand Down Expand Up @@ -143,7 +143,7 @@ fn util_list_certs() {
let native = rustls_native_certs::load_native_certs().unwrap();

for (i, cert) in native.iter().enumerate() {
let cert = extract_trust_anchor(&cert).unwrap();
let cert = anchor_from_trusted_cert(&cert).unwrap();
println!("cert[{i}] = {}", stringify_x500name(&cert.subject));
}
}
9 changes: 7 additions & 2 deletions tests/smoketests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@ fn check_site(domain: &str) {
.with_root_certificates(roots)
.with_no_client_auth();

let mut conn =
rustls::ClientConnection::new(Arc::new(config), domain.try_into().unwrap()).unwrap();
let mut conn = rustls::ClientConnection::new(
Arc::new(config),
pki_types::ServerName::try_from(domain)
.unwrap()
.to_owned(),
)
.unwrap();
let mut sock = TcpStream::connect(format!("{}:443", domain)).unwrap();
let mut tls = rustls::Stream::new(&mut conn, &mut sock);
tls.write_all(
Expand Down