I would like to be able to have gpg-agent cache passphrases infinitly.
Poking around the source I find in agent/cache.c line 41
int ttl; /* max. lifetime given in seconds, -1 one means infinite */
and lines 193-198
/* Store DATA of length DATALEN in the cache under KEY and mark it
with a maximum lifetime of TTL seconds. If there is already data
under this key, it will be replaced. Using a DATA of NULL deletes
the entry. A TTL of 0 is replaced by the default TTL and a TTL of
-1 set infinite timeout. CACHE_MODE is stored with the cache entry
and used to select different timeouts. */
So maybe this should work by specifying -1 for the various *-cache-ttl*
options, but I couldn't get it to work. For me it does the same thing as if
I had specified zero, it prompts me every time.
So this is a wishlist request for infinite timeout support (and documention
on the gpg-agent manpage).
(just in case you are wondering _why_ I would want an infinite timeout...
This is for an automated signing process; I intend to login once after
reboot and specify the passphrase where it will stay in memory until the
machine is powered off. This is preferrable to leaving the key unlocked on
the machine or the passphrase in a file somewhere.)
Thanks,