Skip to content

Commit

Permalink
Remove tests for common name handling
Browse files Browse the repository at this point in the history
As suggested by @ctz in this comment:
#167 (comment).
  • Loading branch information
hawkw authored and djc committed Sep 12, 2023
1 parent 0a8bd63 commit bb9fe71
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 38 deletions.
16 changes: 0 additions & 16 deletions tests/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,13 +312,6 @@ def tls_server_certs(force: bool) -> None:
permitted_subtrees=[x509.DNSName(".example.com")],
)

generate_tls_server_cert_test(
output,
"disallow_subject_common_name",
expected_error="NameConstraintViolation",
subject_common_name="disallowed.example.com",
excluded_subtrees=[x509.DNSName("disallowed.example.com")],
)
generate_tls_server_cert_test(
output,
"disallow_dns_san",
Expand Down Expand Up @@ -353,15 +346,6 @@ def tls_server_certs(force: bool) -> None:
x509.DNSName("allowed-cn.example.com"),
],
)
generate_tls_server_cert_test(
output,
"allow_dns_san_and_disallow_subject_common_name",
expected_error="NameConstraintViolation",
sans=[x509.DNSName("allowed-san.example.com")],
subject_common_name="disallowed-cn.example.com",
permitted_subtrees=[x509.DNSName("allowed-san.example.com")],
excluded_subtrees=[x509.DNSName("disallowed-cn.example.com")],
)
generate_tls_server_cert_test(
output,
"disallow_dns_san_and_allow_subject_common_name",
Expand Down
22 changes: 0 additions & 22 deletions tests/tls_server_certs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,6 @@ fn additional_dns_labels() {
);
}

#[test]
fn disallow_subject_common_name() {
let ee = include_bytes!("tls_server_certs/disallow_subject_common_name.ee.der");
let ca = include_bytes!("tls_server_certs/disallow_subject_common_name.ca.der");
assert_eq!(
check_cert(ee, ca, &[], &[]),
Err(webpki::Error::NameConstraintViolation)
);
}

#[test]
fn disallow_dns_san() {
let ee = include_bytes!("tls_server_certs/disallow_dns_san.ee.der");
Expand Down Expand Up @@ -138,18 +128,6 @@ fn allow_dns_san_and_subject_common_name() {
);
}

#[test]
fn allow_dns_san_and_disallow_subject_common_name() {
let ee =
include_bytes!("tls_server_certs/allow_dns_san_and_disallow_subject_common_name.ee.der");
let ca =
include_bytes!("tls_server_certs/allow_dns_san_and_disallow_subject_common_name.ca.der");
assert_eq!(
check_cert(ee, ca, &[], &[]),
Err(webpki::Error::NameConstraintViolation)
);
}

#[test]
fn disallow_dns_san_and_allow_subject_common_name() {
let ee =
Expand Down

0 comments on commit bb9fe71

Please sign in to comment.