From: Gregor Zattler <telegraph@gmx.net>
To: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: Stop emacs caching gpg keys
Date: Sat, 30 Jan 2021 18:14:18 +0100 [thread overview]
Message-ID: <20210130171418.GF8430@no.workgroup> (raw)
In-Reply-To: <87y2gasafq.fsf@yandex.com>
Hi Colin,
* Colin Baxter <m43cap@yandex.com> [30. Jan. 2021]:
> I have GnuPG (gpg) version 2.1.18. As is well known, this version of gpg
> has the utterly annoying habit of storing gpg keys in the cache for some
> time (1 hour default, I think).
>
> To stop this happening I run 'gpgconf --kill gpg-agent'. This works fine
> in bash scripts that control the encryption, where I can put that
> command in the script.
wouldn't it be easyier to configure gpg-agent:
--default-cache-ttl n
Set the time a cache entry is valid to n seconds. The default
is 600 seconds. Each time a cache entry is accessed, the en‐
try's timer is reset. To set an entry's maximum lifetime, use
max-cache-ttl. Note that a cached passphrase may not evicted
immediately from memory if no client requests a cache opera‐
tion. This is due to an internal housekeeping function which
is only run every few seconds.
--max-cache-ttl n
Set the maximum time a cache entry is valid to n seconds. Af‐
ter this time a cache entry will be expired even if it has
been accessed recently or has been set using gpg-preset-
passphrase. The default is 2 hours (7200 seconds).
Therefore I have this configuration:
~/.gnupg$ cat gpg-agent.conf
default-cache-ttl 300
max-cache-ttl 1200
Ciao, Gregor
--
-... --- .-. . -.. ..--.. ...-.-
next prev parent reply other threads:[~2021-01-30 17:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-30 15:37 Stop emacs caching gpg keys Colin Baxter
2021-01-30 15:54 ` moasenwood--- via Users list for the GNU Emacs text editor
2021-01-30 16:06 ` Colin Baxter
2021-01-30 16:48 ` moasenwood--- via Users list for the GNU Emacs text editor
2021-01-30 16:59 ` Colin Baxter
2021-01-30 17:14 ` Gregor Zattler [this message]
2021-01-31 8:37 ` Colin Baxter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210130171418.GF8430@no.workgroup \
--to=telegraph@gmx.net \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).