Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keys: list fingerprints exactly as python-gnupg does it #84

Merged
merged 1 commit into from
Jun 27, 2023

Conversation

tigarmo
Copy link
Collaborator

@tigarmo tigarmo commented Jun 26, 2023

This commit updates the logic of get_key_fingerprints() to be the same as python-gnupg's (used before 1.0):

  • Don't list the fingerprints of sub-keys;
  • List the fingerprints of primary keys in the order that they are listed by gpg, even if the key is expired.

The commit is the first one on the road to fixing a regression in the 1.* release series, of repository keys with more than one key (primary or sub-key) not being supported.

  • Have you followed the guidelines for contributing?
  • Have you signed the CLA?
  • Have you successfully run tox?

This commit updates the logic of `get_key_fingerprints()` to be the
same as python-gnupg's (used before 1.0):

- Don't list the fingerprints of sub-keys;
- List the fingerprints of primary keys in the order that they are
  listed by gpg, even if the key is expired.

The commit is the first one on the road to fixing a regression in the
1.* release series, of repository keys with more than one key (primary
or sub-key) not being supported.
@codecov
Copy link

codecov bot commented Jun 26, 2023

Codecov Report

Merging #84 (ca6b641) into hotfix/1.1.1 (1c354f2) will increase coverage by 0.07%.
The diff coverage is 100.00%.

@@               Coverage Diff                @@
##           hotfix/1.1.1      #84      +/-   ##
================================================
+ Coverage         90.44%   90.51%   +0.07%     
================================================
  Files                13       13              
  Lines               659      664       +5     
  Branches            131      133       +2     
================================================
+ Hits                596      601       +5     
  Misses               47       47              
  Partials             16       16              
Impacted Files Coverage Δ
craft_archives/repo/apt_key_manager.py 98.36% <100.00%> (+0.07%) ⬆️

@tigarmo tigarmo requested a review from lengau June 26, 2023 19:00
@tigarmo tigarmo marked this pull request as ready for review June 26, 2023 19:00
Copy link
Collaborator

@lengau lengau left a comment

Choose a reason for hiding this comment

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

Nice. Thanks!

@tigarmo tigarmo merged commit b1c20e2 into hotfix/1.1.1 Jun 27, 2023
@tigarmo tigarmo deleted the multiple-fingerprints branch June 27, 2023 19:10
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