PR #1069 follow-up - #1071
Open
robstradling wants to merge 2 commits into
Open
Conversation
The S/MIME BRs say the Subject CN field is optional for Organization Validated certificates. The lint was treating an absent CN (empty string) as invalid, returning Error instead of Pass. Also guard against a potential panic when Subject.Organization is empty. Fixes issue reported after merging of #1069.
The S/MIME BRs say the Subject CN field is optional. Move the empty-CN check from Execute into CheckApplies so the lint returns NA (not applicable) rather than Error when no CN is present.
Member
Author
|
I also thought about how to handle Subject CNs where the attribute is present but its value is zero-length. It seems that the |
Contributor
|
@robstradling You are right: I forgot to consider the case when the Subject CN is absent, which is allowed. As to the case when it is empty, that's a different problem. At any rate, I am fine with your proposed adjustments. |
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.
The
lint_org_validated_invalid_cnlint added by PR #1069 mishandles OV S/MIME certificates that omit the Subject CN field. Instead of treating the lint as not applicable due to the absent CN, it treats the empty string as an invalid email address and a mismatch for the Subject O.This PR fixes the problem and adds a suitable test case.