Add lint to check for email addresses in Subject but not in SAN (prohibited by RFC 5280 section 4.1.2.6)#1026
Merged
Conversation
Contributor
Author
|
It looks like I got an unexpected HTTP error in the integration test that should be fixable by redoing it, but I don't think I can do that myself... |
christopher-henderson
approved these changes
Mar 14, 2026
christopher-henderson
left a comment
Member
There was a problem hiding this comment.
Thank you! And yes, the integration test had a bit of flakiness there - thank you for your patience.
| } | ||
| }, | ||
| "e_subj_email_not_in_san": { | ||
| "ErrCount": 16576 |
There was a problem hiding this comment.
I was a bit skeptical of this, but it is not unprecedented to have a requirement that is (relatively) violated by the a chunk of the corpus.
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.
Reflecting on a recent incident, I realized that ZLint doesn't detect violations of RFC 5280 section 4.1.2.6 regarding email addresses:
Therefore, if a certificate contains an email address in the Subject field (which is deprecated, but not strictly prohibited), the same email address MUST also be present in the SAN extension.
One might think this issue only affects S/MIME certificates, but that's not the case: there are in fact quite a few TLS Server certificates out there that contain email addresses -- even trusted and recently issued ones.
It's one thing the presence of an email inside the SAN (this is forbidden by the CABF BRs for TLS Server certificates, and there's already a lint that checks for this); it's another thing the presence of an email outside the SAN that is not also in the SAN: this is forbidden, for any type of certificate, by RFC 5280 (actually since RFC 2459), and that's what the lint proposed here is about.