Skip to content

Comments

Fix gpg.verify with python-gnupg >= 0.5.1#67095

Merged
dwoz merged 3 commits intosaltstack:3007.xfrom
lkubb:fix/gpg-verify-trust-levels
Apr 27, 2025
Merged

Fix gpg.verify with python-gnupg >= 0.5.1#67095
dwoz merged 3 commits intosaltstack:3007.xfrom
lkubb:fix/gpg-verify-trust-levels

Conversation

@lkubb
Copy link
Contributor

@lkubb lkubb commented Dec 12, 2024

What does this PR do?

Fixes signature validity reporting with python-gnupg >=0.5.1, where the reported levels are off by -1 (changed in vsajip/python-gnupg#205). Thus also fixes a crash with the highest level, which would throw a KeyError.

Note: This issue is found in 3006.9 as well, but not as relevant since the pinned version there is 0.4.8. The code has changed a lot between both versions, which is why I opted to submit this for 3007+ only.

What issues does this PR fix or reference?

Fixes: #66685

Previous Behavior

  • Crashes when an ultimately trusted key made a signature
  • Otherwise reports one level too low

New Behavior

Works as expected/reports correct levels

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes

@lkubb lkubb requested a review from a team as a code owner December 12, 2024 09:11
Copy link
Contributor

@twangboy twangboy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would create a changelog please?

@dwoz dwoz force-pushed the fix/gpg-verify-trust-levels branch from 8e22459 to 1f892b5 Compare April 25, 2025 08:56
@dwoz dwoz merged commit e872807 into saltstack:3007.x Apr 27, 2025
722 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants