Skip to content

Commit 2350c2e

Browse files
committed
tests: rework no_subject_alt_names test
We can express this test with the `expect_cert_dns_names` helper.
1 parent 8d60950 commit 2350c2e

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

tests/integration.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -334,16 +334,7 @@ fn wildcard_subject_alternative_names() {
334334
#[cfg(feature = "alloc")]
335335
#[test]
336336
fn no_subject_alt_names() {
337-
let ee = CertificateDer::from(&include_bytes!("misc/no_subject_alternative_name.der")[..]);
338-
339-
let cert = webpki::EndEntityCert::try_from(&ee)
340-
.expect("should parse end entity certificate correctly");
341-
342-
let names = cert
343-
.dns_names()
344-
.expect("we should get a result even without subjectAltNames");
345-
346-
assert!(names.collect::<Vec<_>>().is_empty());
337+
expect_cert_dns_names(include_bytes!("misc/no_subject_alternative_name.der"), [])
347338
}
348339

349340
#[cfg(feature = "alloc")]

0 commit comments

Comments
 (0)