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

Lazy decryption for keyfiles #66

Merged
merged 1 commit into from
Sep 23, 2021
Merged

Lazy decryption for keyfiles #66

merged 1 commit into from
Sep 23, 2021

Conversation

smlx
Copy link
Owner

@smlx smlx commented Sep 23, 2021

When performing signing for a given key, gpg will interrogate the
gpg-agent for availability of keygrips of all signing keys, not just
the one that ends up being used for the actual signing.

piv-agent used to pre-emptively decrypted the keyfiles when checking
them against the supplied keygrip. This change causes it to wait until
the actual point of signature before decrypting the keyfiles.

This means that you avoid a pinentry prompt for keyfiles when signing
using a hardware security device.

This change also makes a couple of error handling changes to make
piv-agent more robust when cancelling or failing pinentry prompts.

Closes: #58

When performing signing for a given key, gpg will interrogate the
gpg-agent for availability of keygrips of _all_ signing keys, not just
the one that ends up being used for the actual signing.

piv-agent used to pre-emptively decrypted the keyfiles when checking
them against the supplied keygrip. This change causes it to wait until
the actual point of signature before decrypting the keyfiles.

This means that you avoid a pinentry prompt for keyfiles when signing
using a hardware security device.

This change also makes a couple of error handling changes to make
piv-agent more robust when cancelling or failing pinentry prompts.
@smlx smlx added the enhancement New feature or request label Sep 23, 2021
@smlx smlx enabled auto-merge September 23, 2021 13:07
@smlx smlx merged commit f964f11 into main Sep 23, 2021
@smlx smlx deleted the lazy-keyfile-decryption branch September 23, 2021 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lazy decryption for keyfiles
1 participant