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

trezor-gpg-agent cache expiration #474

Open
Dehumanizer77 opened this issue Jan 17, 2024 · 2 comments
Open

trezor-gpg-agent cache expiration #474

Dehumanizer77 opened this issue Jan 17, 2024 · 2 comments

Comments

@Dehumanizer77
Copy link

I have noticed that when I initialize gpg using trezor-gpg, the trezor-gpg-agent is running with "--cache-expiry-seconds=inf" option, which means it will keep the passphrase cached indefinitely if I understand it correctly. Which might not always be what user wants, for example if someone is switching several trezors with several different identities, or wants to use the same trezor with more than one passphrase.
At the moment, if you want to use a different passphrase, you need to kill the trezor-gpg-agent so that it won't use the cached password. Which is fine, but a possibility of specifying the cache expiration somewhere would be nice.

@Dehumanizer77
Copy link
Author

Or at least it might be a good idea to hint user on the cached passphrase, because if you use a different passphrase and you're not aware that you already have some previous one cached with trezor-gpg-agent, you only get "No secret key" error message, which does not exactly tell you what is the problem.

@Dehumanizer77
Copy link
Author

The workflow when initializing or reinitializing the gpg-key with trezor is that Trezor asks me for a passphrase, then I need to confirm the gpg key twice and then (if not cached), it asks me for the passphrase again. If it's cached, it does not ask for it, but fails with "No secret key" in case the passphrase entered at the beginning is different from the one that is cached.

This was the main point of confusion for me yesterday when I spent quite a lot of time until I figured out what's the problem.

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

No branches or pull requests

1 participant