Add lint to check for multiple Reserved Policy Identifiers in Subordinate CA certificates#959
Merged
christopher-henderson merged 37 commits intozmap:masterfrom Jun 15, 2025
Conversation
Added //nolint:all to comment block to avoid golangci-lint to complain about duplicate words in comment
Fixed import block
Fine to me. Co-authored-by: Christopher Henderson <[email protected]>
As per Chris Henderson's suggestion, to "improve readability".
As per Chris Henderson's suggestion.
Added CABFEV_Sec9_2_8_Date
christopher-henderson
approved these changes
Jun 15, 2025
Member
christopher-henderson
left a comment
There was a problem hiding this comment.
Great lint, thank you very much!
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.
Made suspicious by a recent incident (see https://bugzilla.mozilla.org/show_bug.cgi?id=1963663), I discovered that Zlint is lacking a uniqueness check for reserved policy identifiers within non-policy-restricted TLS SubCA certificates. It is in fact required by the CABF BRs that there is exactly one Reserved Policy Identifier in such CA certificates. I am therefore proposing this lint to fill the gap.
Although Ballot SC083 (implemented in BRs v2.1.3) made it absolutely clear, IMO it was already quite clear in BRs v2.0.0 that in a TLS SubCA certificate, if it is a policy restricted SubCA, "Regardless of the order of PolicyInformation values, the Certificate Policies extension MUST contain exactly one Reserved Certificate Policy Identifier" (quoted from the BRs, section 7.1.2.10.5). Therefore I set the EffectiveDate of this lint to the publication date of BRs v2.0.0.
This lint is configurable, thus allowing to safely distinguish a cross-certificate from a normal SubCA certificate. To signal this lint that the certificate under examination is a cross-certificate, pass to zlint a TOML file containing the following directive: