Skip to content

Commit

Permalink
test_limbo: skip things more idiomatically
Browse files Browse the repository at this point in the history
  • Loading branch information
woodruffw committed Mar 5, 2024
1 parent 8221e18 commit 1b06911
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions tests/x509/verification/test_limbo.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@
# with what webpki and rustls do, but inconsistent with Go and OpenSSL.
"rfc5280::ca-as-leaf",
"pathlen::validation-ignores-pathlen-in-leaf",
# Client testcases are not supported yet.
"rfc5280::nc::nc-permits-email-exact",
"rfc5280::nc::nc-permits-email-domain",
}


Expand All @@ -91,12 +88,16 @@ def _get_limbo_peer(expected_peer):

def _limbo_testcase(id_, testcase):
if id_ in LIMBO_SKIP_TESTCASES:
return
pytest.skip(f"explicitly skipped testcase: {id_}")

features = testcase["features"]
if LIMBO_UNSUPPORTED_FEATURES.intersection(features):
return
assert testcase["validation_kind"] == "SERVER"
unsupported = LIMBO_UNSUPPORTED_FEATURES.intersection(features)
if unsupported:
pytest.skip(f"explicitly skipped features: {unsupported}")

if testcase["validation_kind"] != "SERVER":
pytest.skip("non-SERVER testcase")

assert testcase["signature_algorithms"] == []
assert testcase["extended_key_usage"] == [] or testcase[
"extended_key_usage"
Expand Down

0 comments on commit 1b06911

Please sign in to comment.