update x509-limbo to latest, fix empty name constraint seq handling - #535
Merged
Conversation
This brings in new tests for empty permittedSubtrees name constraints. The non-empty control passes as expected, but webpki treats an empty permittedSubtrees sequence as absent. Add the invalid empty case to exceptions.
RFC 5280 requires NameConstraints to contain at least one of permittedSubtrees or excludedSubtrees. Both fields use GeneralSubtrees, which is defined as a sequence with one or more entries. A present but empty field is therefore invalid. Reject these encodings as malformed name constraints. This allows the x509-limbo cases for an empty extension, two empty subtree fields, and an empty permittedSubtrees alongside excludedSubtrees to pass without exceptions.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #535 +/- ##
=======================================
Coverage 97.63% 97.63%
=======================================
Files 20 20
Lines 4099 4106 +7
=======================================
+ Hits 4002 4009 +7
Misses 97 97 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
djc
approved these changes
Sep 2, 2026
Member
|
Nice! |
ctz
approved these changes
Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates x509-limbo to latest. Notably this adds a testcase (C2SP/x509-limbo#658) for an empty permittedSubtrees sequence (
rfc5280::nc::permitted-empty-sequence-excluded-nonempty) that webpki previously accepted.In a subsequent commit the behavior is fixed so that we reject this new case as expected (and the related
webpki::nc::intermediate-permitted-excluded-subtrees-both-nullandwebpki::nc::intermediate-permitted-excluded-subtrees-both-empty-sequencescases we had pre-existing exceptions for). I think is pretty straight forward spec compliance and since NCs are rare in practice should have no meaningful user impact.This also checks off one of the #70 entries, "RFC5280 s4.2.1.10 'Conforming CAs MUST NOT issue certificates where name constraints is an empty sequence.'".