CXX-3002 fix keyring and trust for verifying GPG signatures #1390
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.
Followup to #1388 which fixes/improves two observed issues.
The
gpgv
command for verifying the dist tarball signature was failing due to the following error(s):This is apparently due to
gpgv
expecting a keyring namedtrustedkeys.kbx
, whereasgpg
usespubring.kbx
by default. (Note: this was not an issue prior to #1388 due to using a temporary file as the keyring rather than a temporaryGNUPGHOME
directory.) This PR initially specified--keyring pubring.kbx
in thegpgv
command so the keyring used is consistent with the default forgpg
.However, the command is changed from
gpgv
togpg --verify
as described below, so this issue is no longer relevant.The
gpgv
command is actually somewhat lax in requirements, per man pages:This command was therefore evading a warning that is emitted with
git tag -v
, which appears to usegpg --verify
rather thangpgv
:To use the stricted signature validation requirements, both verification commands (for the dist tarball and for the git tag) are made consistent to use
gpg --verify
. These commands also now include a preceeding--import-ownertrust
command which sets the trust level for the Release Signing Key to "Ultimate" prior to verification (this level matches the trust level of the key when signing with garasign-gpg / garasign-git).As a drive-by improvement, the
--update-trustdb
command is manually invoked with--quiet
before other gpg operations to avoid unnecessary noise in the output which looks like: