Skip to content

Add lint to check for multiple Reserved Policy Identifiers in Subordinate CA certificates#959

Merged
christopher-henderson merged 37 commits intozmap:masterfrom
defacto64:ca_multiple_reserved_policy_oids
Jun 15, 2025
Merged

Add lint to check for multiple Reserved Policy Identifiers in Subordinate CA certificates#959
christopher-henderson merged 37 commits intozmap:masterfrom
defacto64:ca_multiple_reserved_policy_oids

Conversation

@defacto64
Copy link
Copy Markdown
Contributor

@defacto64 defacto64 commented Jun 7, 2025

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:

[e_ca_multiple_reserved_policy_oids]
CrossCert = true

defacto64 and others added 30 commits March 8, 2024 16:07
Added //nolint:all to comment block to avoid golangci-lint to complain about duplicate words in comment
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
Copy link
Copy Markdown
Member

@christopher-henderson christopher-henderson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great lint, thank you very much!

@christopher-henderson christopher-henderson merged commit 71f17a7 into zmap:master Jun 15, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants