Skip to content

gpg: fix handling of multiple public keys#2897

Closed
wlcx wants to merge 1 commit intonix-community:masterfrom
wlcx:master
Closed

gpg: fix handling of multiple public keys#2897
wlcx wants to merge 1 commit intonix-community:masterfrom
wlcx:master

Conversation

@wlcx
Copy link
Copy Markdown
Contributor

@wlcx wlcx commented Apr 16, 2022

Description

When processing publicKeys entries, handle entries that contain multiple public keys (i.e. gpg --show-key returns multiple pub lines) properly, setting the trust level for each key.

Previously, multiple pub entries caused an error, since the keyids separated by newlines were passed straight to gpg --edit-key.

Checklist

  • Change is backwards compatible. Single keys still work fine.

  • Code formatted with ./format. Manually formatted with nixfmt

  • Code tested through nix-shell --pure tests -A run.all.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.

    • Added myself and the module files to .github/CODEOWNERS.

When processing `publicKeys` entries, handle entries that contain
multiple public keys (i.e. gpg --show-key returns multiple `pub` lines)
properly, setting the trust level for each key.
@wlcx wlcx requested a review from rycee as a code owner April 16, 2022 19:25
Copy link
Copy Markdown
Member

@berbiche berbiche left a comment

Choose a reason for hiding this comment

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

Looks fine to me!

rycee pushed a commit that referenced this pull request Apr 17, 2022
When processing `publicKeys` entries, handle entries that contain
multiple public keys (i.e. gpg --show-key returns multiple `pub`
lines) properly, setting the trust level for each key.

PR #2897
@rycee
Copy link
Copy Markdown
Member

rycee commented Apr 17, 2022

Thanks! Rebased to master in 620ed19.

@rycee rycee closed this Apr 17, 2022
@wlcx
Copy link
Copy Markdown
Contributor Author

wlcx commented Apr 18, 2022

Awesome, thanks folks. Any chance we could backport to release-21.11?

rycee pushed a commit that referenced this pull request Apr 24, 2022
When processing `publicKeys` entries, handle entries that contain
multiple public keys (i.e. gpg --show-key returns multiple `pub`
lines) properly, setting the trust level for each key.

PR #2897

(cherry picked from commit 620ed19)
teto pushed a commit to teto/home-manager that referenced this pull request Aug 22, 2022
When processing `publicKeys` entries, handle entries that contain
multiple public keys (i.e. gpg --show-key returns multiple `pub`
lines) properly, setting the trust level for each key.

PR nix-community#2897
@rycee
Copy link
Copy Markdown
Member

rycee commented Oct 11, 2022 via email

spacekookie pushed a commit to spacekookie/home-manager that referenced this pull request Feb 10, 2023
When processing `publicKeys` entries, handle entries that contain
multiple public keys (i.e. gpg --show-key returns multiple `pub`
lines) properly, setting the trust level for each key.

PR nix-community#2897
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.

3 participants