Add cross-sign configuration for CA name tests#987
Merged
christopher-henderson merged 2 commits intozmap:masterfrom Sep 1, 2025
Merged
Add cross-sign configuration for CA name tests#987christopher-henderson merged 2 commits intozmap:masterfrom
christopher-henderson merged 2 commits intozmap:masterfrom
Conversation
christopher-henderson
approved these changes
Sep 1, 2025
Member
christopher-henderson
left a comment
There was a problem hiding this comment.
This is a great use of the configuration framework!
And thank you for the extremely thorough due diligence and explanation. It is a refreshing change of pace for me as, in my duties elsewhere, I have grown numb to change lists which feature completely empty PR bodies and zero code comments or rationale.
| // out a TOML document that is the full default configuration for ZLint. | ||
| var defaultGlobals = []GlobalConfiguration{ | ||
| &Global{}, | ||
| &CABFBaselineRequirementsConfig{}, |
Member
There was a problem hiding this comment.
🙏 thank you for the inline fix!
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.
Notes
This adds a new source level configuration to allow the user to specify that the input is a "Cross-Certified Subordinate CA Certificate" under the profile in § 7.1.2.2 to support proper evaluation of the subjects of those certificates. Unlike all the other CA profiles, these certificates are exempt from the CA naming rules in § 7.1.2.10.2 and instead have their own naming rules in § 7.1.2.2.2 that require only that they be byte-for-byte identical to the subject of the previous CA certificate. The only restriction is that the previous certificate must have been "issued in compliance with the then-current version of the Baseline Requirements." There's no way for zlint to check this or what naming requirements existed at the time, so instead it treats the CA naming rules as not applicable.
The reason this configuration is required is that there is no way to detect a cross-signed CA from the certificate itself. The only way to determine this would be a global search for matching CA certificates, which is clearly outside the scope of a static analysis tool like zlint. Instead, this allows the user (which might be the CA organization which issued it) to specify which rule set should apply based on outside context.
CABFBaselineRequirementsConfigfrom the global config list.e_ca_common_name_missing,e_ca_country_name_invalid,e_ca_country_name_missing, ande_ca_organization_name_missingto exempt CA certificates where the user indicates that they are cross-signed CAsNAthanPASSbecause they don't actually pass the checks, the section those checks are based on just doesn't apply to them, similar to how it doesn't apply to subscriber certificates.e_ca_country_name_invalidtest cases as an empty string is clearly an invalid name.e_ca_country_name_missinganyway, so I included them here.Testing
e_ca_country_name_missingis intended to test forDocument References
(Direct section fragment links work in Chrome, YMMV.)
Related Items