Skip to content

refactor ca country invalid CheckApplies(), add tests, fix typo#1032

Merged
christopher-henderson merged 2 commits into
zmap:masterfrom
mhyder13:country-invalid-refactor
Apr 19, 2026
Merged

refactor ca country invalid CheckApplies(), add tests, fix typo#1032
christopher-henderson merged 2 commits into
zmap:masterfrom
mhyder13:country-invalid-refactor

Conversation

@mhyder13

Copy link
Copy Markdown
Contributor

This is just a small refactor to clean up a few things I noticed. I included some more unit testing as a bonus. This change shouldn't cause an externally-visible behavior change to zlint.

  • Moves the check in e_ca_country_name_invalid for if there is actually a country included to CheckApplies(), since this check currently explicitly responds NA for that case
  • Adds some new unit test cases to cover certificate with multiple countries included
  • Add a test case for the effective date
  • Refactors many of the existing unit tests (and the new ones) into a table-driven test based on feedback from Fix IV countryName lint checkApplies, add IV personal name lint history #1027
    • I generated the new certificates with P-256 keys to reduce the size hit to the code base.
  • Fixes a typo in a comment in e_cab_iv_requires_personal_name

Comment thread v3/lints/cabf_br/lint_ca_country_name_invalid.go
@christopher-henderson christopher-henderson merged commit 12ccc55 into zmap:master Apr 19, 2026
4 checks passed
@mhyder13 mhyder13 deleted the country-invalid-refactor branch April 19, 2026 23:58
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