[PATCH] doc: elaborate on --default-cache-ttl and --max-cache-ttl

Werner Koch wk at gnupg.org
Wed Oct 29 17:35:05 CET 2014

On Wed, 29 Oct 2014 16:34, iomartin at iomartin.net said:

> I'm not sure I'm following you here. On agent/cache.c, the declaration
> of struct cache_item_s is

That one is for the internal API.  The command line optiosn are a
different thing.  Actually, I just pushed a patch which checks the
ranges of numerical arguments.  With that using -1 is not any long

> on what situations could we have ttl < 0 then if not with
> default-cache-ttl? Is that what gpg-set-passphrase is for?

For example via cmd_preset_passphrase().

> Do you mean that if you someone wants to have all passphrases to have
> infinite ttl, then they should explicitly use gpg-set-passphrase for all
> of them?

If you want set, you should simply remove the passpharses from the keys.

> Finally, what is the rationale behind max-cache-ttl not allowing
> "infinite"? Afterall, in practice, it could be achieved by setting an
> extremely high value for max-cache-ttl. I'd be happy to work on a patch

Exactly, use something like 0x00ffffff (194 days).  There is small bug
lingering in the code if you use a too high value, though.



Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.

More information about the Gnupg-devel mailing list