Werner Koch wk at
Fri Aug 5 10:01:24 CEST 2022

On Thu,  4 Aug 2022 21:27, folkert said:

> How can I, programmatically, prevent gpg-agent to cache a passphrase?
> Or clear its cache?


max-cache-ttl 0

into gpg-agent.conf

To fluish the cache run

  gpgconf --reload gpg-agent

>    err = gpgme_set_ctx_flag(ctx, "no-symkey-cache", "1");
> but then when I run my program for the second time, it uses a cached
> item.

If this has been set, the cache should not be used.  Note, this is only
for this special symmetric password caching (which uses the salt of the



The pioneers of a warless world are the youth that
refuse military service.             - A. Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <>

More information about the Gnupg-users mailing list