rustls / webpki-roots

CA certificates for use with webpki
Apache License 2.0
89 stars 47 forks source link

tests: add name constraints integration test. #40

Closed cpu closed 1 year ago

cpu commented 1 year ago

This is a follow up to https://github.com/rustls/webpki-roots/pull/39 that adds a basic integration test for trust anchors in webpki-roots with name constraints.

The general idea is that for each name constraints extension we:

Checking out v0.25.1 and backporting this test identifies a problem with the KamuSM root name constraint, finding no subtrees after parsing:

running 1 test
test name_constraints ... FAILED

failures:

---- name_constraints stdout ----
thread 'name_constraints' panicked at 'empty permitted subtrees in constraints', tests/verify.rs:142:5

With the fix from https://github.com/rustls/webpki-roots/pull/39 the test passes.

cpu commented 1 year ago

cpu force-pushed the cpu-name-constraint-integration-tests branch from d817342 to 99c5e77

Sorry for the force pushes. Just tidying up small things (stale comments, bad var names, etc) I noticed reviewing this after opening the PR. All done now.

cpu commented 1 year ago

Going to merge this w/ one review since it's only test code. Thanks!