You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mk-ca-bundle.pl: add -x option to exclude specific CA roots - #23508
Where sha256* are stripped from whitespace, colons (:) and matched
case-insentively with CA root fingerprints in the source bundle.
Note: delete any existing certdata.txt to force a rebuild when -x
option is added/modified/removed and a re-generation is necessary as a
result.
on the fence with regeneration behavior. We do want to regen if -x is passed first,
but not after, unless the source changed again.
With forced regen, a new bundle may be created in an automated scenario,
which is undesried.
→ adding/updating -x in a scheduled regen script also needs to manually clear
the previous source certdata.txt to trigger a regen and apply -x exclusions.
Examples:
```sh
..mk-ca-bundle.pl -x <sha256>
..mk-ca-bundle.pl -x <sha256-1>,<sha256-2>
```
Where `sha256` is stripped from whitespace, colons (:) and matched
case-insentively with CA root fingerprints in the source bundle.
This reverts commit 75e32e7.
It can cause more problems than it solves, by regenerating
unconditionally while `-x is passed. It's perhaps better to
force a regen manually when `-x` is added/changed/removed,
or not force a regen once its removal is a no-op (because
upstream removed the excluded roots.)
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Document -x and include exclusions in regeneration invalidation.
No open issues 🎉
2 previously missed issues
In code that hasn't changed since last review
Document the new -x exclusion option in the manual and synopsis
scripts/mk-ca-bundle.pl:191
This adds a public command-line option, but the user-facing mk-ca-bundle manual does not document -x (and the script's usage synopsis at line 165 is also unchanged). Users invoking the installed/documented tool will not learn how to supply the exclusion fingerprints or the regeneration caveat; please update the generated documentation and synopsis alongside the help text.
Include exclusions in regeneration detection to refresh changed bundles
scripts/mk-ca-bundle.pl:309
The exclusion list is not part of the regeneration decision: oldhash is compared with the downloaded source hash before this processing block, so adding, changing, or removing -x after a bundle has been generated exits without applying the new list. Deleting certdata.txt does not fix this—the file is downloaded again and has the same hash—so the regeneration procedure in the PR description cannot produce the requested bundle. Please include the normalized exclusions in the cache key/header or otherwise explicitly invalidate the existing output when this option changes.
Document the new -x exclusion option in the manual and synopsis
Pushed a fix.
The exclusion list is not part of the regeneration decision: oldhash is compared with the downloaded source hash before this processing block, so adding, changing, or removing -x after a bundle has been generated exits without applying the new list. Deleting certdata.txt does not fix this—the file is downloaded again and has the same hash—so the regeneration procedure in the PR description cannot produce the requested bundle. Please include the normalized exclusions in the cache key/header or otherwise explicitly invalidate the existing output when this option changes.
I'm aware, and decided against doing this as overkill.
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
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.
Examples:
Where
sha256*are stripped from whitespace, colons (:) and matchedcase-insentively with CA root fingerprints in the source bundle.
Note: delete any existing
certdata.txtto force a rebuild when-xoption is added/modified/removed and a re-generation is necessary as a
result.
-xis passed first,but not after, unless the source changed again.
With forced regen, a new bundle may be created in an automated scenario,
which is undesried.
→ adding/updating
-xin a scheduled regen script also needs to manually clearthe previous source
certdata.txtto trigger a regen and apply-xexclusions.