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

test: update snapshots from s2n-tls 0.3.8 behavior #2412

Merged
merged 1 commit into from
Dec 11, 2024
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
2 changes: 2 additions & 0 deletions quic/s2n-quic-tls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ openssl = { version = "0.10" }
openssl-sys = { version = "0.9", features = ["vendored"] }
s2n-quic-core = { path = "../s2n-quic-core", features = ["testing"] }
s2n-quic-rustls = { path = "../s2n-quic-rustls" }
# tests depend on alert behavior from >=0.3.8
s2n-tls = { version = "0.3.8", features = ["quic"] }

# we don't use openssl-sys directly; it's just here to pin and vendor in dev
[package.metadata.cargo-udeps.ignore]
Expand Down
6 changes: 3 additions & 3 deletions quic/s2n-quic-tls/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ fn s2n_client_with_client_auth_s2n_server_does_not_trust_client_certificate() {
// application level host verification check on the cert.
assert!(test_result.is_err());
let e = test_result.unwrap_err();
assert_eq!(e.description().unwrap(), "HANDSHAKE_FAILURE");
assert_eq!(e.description().unwrap(), "CERTIFICATE_UNKNOWN");
}

#[test]
Expand All @@ -448,7 +448,7 @@ fn s2n_client_with_client_auth_s2n_server_does_not_trust_issuer() {
// by a CA that is not in the server trust store, even though the host name is validated.
assert!(test_result.is_err());
let e = test_result.unwrap_err();
assert_eq!(e.description().unwrap(), "HANDSHAKE_FAILURE");
assert_eq!(e.description().unwrap(), "CERTIFICATE_UNKNOWN");
}

#[test]
Expand All @@ -462,7 +462,7 @@ fn s2n_client_with_custom_hostname_auth_rejects_server_name() {
// The handshake should fail because the hostname ("localhost") is not validated
assert!(test_result.is_err());
let e = test_result.unwrap_err();
assert_eq!(e.description().unwrap(), "HANDSHAKE_FAILURE");
assert_eq!(e.description().unwrap(), "CERTIFICATE_UNKNOWN");
}

#[test]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
source: quic/s2n-quic-core/src/event/snapshot.rs
input_file: quic/s2n-quic/src/tests/dc.rs
snapshot_kind: text
---
=== client ===
count#platform_event_loop_started=1
Expand Down Expand Up @@ -451,7 +452,7 @@ count#packet_dropped=1
count#packet_dropped.reason|CONNECTION_ERROR=1
count#connection_closed=1
timer#connection_closed.latency=100ms
count#connection_closed.error|TLS_HANDSHAKE_FAILURE=1
count#connection_closed.error|TLS_CERTIFICATE_UNKNOWN=1
count#frame_sent=1
count#frame_sent.packet|HANDSHAKE=1
count#frame_sent.frame|CONNECTION_CLOSE=1
Expand Down
Loading