Skip to content

Add lint to check CRLs for a valid nextUpdate as per CABF BRs#916

Merged
christopher-henderson merged 36 commits intozmap:masterfrom
defacto64:crl_next_update_invalid
Feb 16, 2025
Merged

Add lint to check CRLs for a valid nextUpdate as per CABF BRs#916
christopher-henderson merged 36 commits intozmap:masterfrom
defacto64:crl_next_update_invalid

Conversation

@defacto64
Copy link
Copy Markdown
Contributor

Already in the CABF TLS BRs v1.8.7 there was a requirement about the maximum lifespan (the time span between thisUpdate and nextUpdate) of CRLs, but until now there was no corresponding check in Zlint. The lint I am proposing here returns an error if this limit is exceeded in the CRL under examination.

It should be noted that the BRs set different lifespan limits depending on whether the CRL covers Subscriber certs (max 10 days) vs. CA certs (max 12 months), but since it is not possible to distinguish the two cases without a context, I implemented the "Configure" interface in this lint. By default, this lint assumes that the input CRL is one that covers Subscriber certs; if you want to specify that it covers CA certs instead, you need to pass Zlint (via the -config option) a TOML file containing the following configuration:

[e_crl_next_update_invalid]
SubscriberCRL = false

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
LintMetadata: lint.LintMetadata{
Name: "e_crl_next_update_invalid",
Description: "For CRLs covering (EE|CA) certificates, nextUpdate must be at most (10 days|12 months) beyond thisUpdate",
Citation: "Section 4.9.7 of BRs v1.8.7 (then section 7.2 since BRs v2.0.0)",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

(then section 7.2 since BRs v2.0.0) Thank you 😭 it is super painful sometimes to go hunting for wording that may have changed just enough to sabotage a raw text search.

config string
want lint.LintStatus
}
data := []Data{
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As always, thank you for the comprehensive test suite. These check out against my own expectations.

@christopher-henderson christopher-henderson merged commit a2721f2 into zmap:master Feb 16, 2025
4 checks passed
aarongable added a commit to letsencrypt/boulder that referenced this pull request Aug 22, 2025
Zlint has added more lints, some of which (like
zmap/zlint#916) are insufficiently smart and
can't tell the difference between a Subscriber CRL and a Root CRL. We
need the ability to skip lints like this, so give the CRL ceremony the
same capability as we already have for our various certificate
ceremonies.
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