Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lint to check for duplicate subject attributes (ATVs) #850

Merged

Conversation

defacto64
Copy link
Contributor

This lint verifies that the Subject field of the certificate does not contain more than one instance of a given
AttributeTypeAndValue across all RelativeDistinguishedNames (with a few exceptions), as per the CABF BRs (section 7.1.4.1). This was not expressly prohibited in the past, and numerous TLS certificates were issued (several years ago) with this weird feature as can be seen in TestCorpus, but it was then banned in CABF BRs v2.0.0.

This lint doesn't care about multi-valued RDNs, despite this being forbidden, as multi-valued RDNs are another lint's business.

I don't think it's very useful to have a similar lint that does the same check on the Issuer field, but I am open to discussion.

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
@christopher-henderson christopher-henderson merged commit 26ca0f3 into zmap:master Jun 2, 2024
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.

None yet

2 participants