--- /dev/null
+===================================================================
+RCS file: /cvs/gnupg/gnupg/agent/cache.c,v
+retrieving revision 1.10
+retrieving revision 1.10.2.1
+diff -u -r1.10 -r1.10.2.1
+--- gnupg/agent/cache.c 2003/01/09 12:59:25 1.10
++++ gnupg/agent/cache.c 2004/08/20 13:43:14 1.10.2.1
+@@ -103,10 +103,11 @@
+ that the user has to enter it from time to time. We do this every hour */
+ for (r=thecache; r; r = r->next)
+ {
+- if (!r->lockcount && r->pw && r->created + 60*60 < current)
++ if (!r->lockcount && r->pw && r->created + opt.max_cache_ttl < current)
+ {
+ if (DBG_CACHE)
+- log_debug (" expired `%s' (1h after creation)\n", r->key);
++ log_debug (" expired `%s' (%lus after creation)\n",
++ r->key, opt.max_cache_ttl);
+ release_data (r->pw);
+ r->pw = NULL;
+ r->accessed = current;
+===================================================================
+RCS file: /cvs/gnupg/gnupg/agent/agent.h,v
+retrieving revision 1.32.2.6
+retrieving revision 1.32.2.7
+diff -u -r1.32.2.6 -r1.32.2.7
+--- gnupg/agent/agent.h 2004/05/11 19:11:53 1.32.2.6
++++ gnupg/agent/agent.h 2004/08/20 13:43:14 1.32.2.7
+@@ -54,6 +54,7 @@
+ const char *scdaemon_program;
+ int no_grab; /* don't let the pinentry grab the keyboard */
+ unsigned long def_cache_ttl;
++ unsigned long max_cache_ttl;
+
+ int running_detached; /* we are running detached from the tty. */
+
+===================================================================
+RCS file: /cvs/gnupg/gnupg/agent/gpg-agent.c,v
+retrieving revision 1.31.2.16
+retrieving revision 1.31.2.17
+diff -u -r1.31.2.16 -r1.31.2.17
+--- gnupg/agent/gpg-agent.c 2004/07/22 09:37:35 1.31.2.16
++++ gnupg/agent/gpg-agent.c 2004/08/20 13:43:14 1.31.2.17
+@@ -77,8 +77,9 @@
+ oLCctype,
+ oLCmessages,
+ oScdaemonProgram,
+- oDefCacheTTL,
+ oDisablePth,
++ oDefCacheTTL,
++ oMaxCacheTTL,
+
+ oIgnoreCacheForSigning,
+ oAllowMarkTrusted,
+@@ -127,6 +128,7 @@
+
+ { oDefCacheTTL, "default-cache-ttl", 4,
+ N_("|N|expire cached PINs after N seconds")},
++ { oMaxCacheTTL, "max-cache-ttl", 4, "@" },
+ { oIgnoreCacheForSigning, "ignore-cache-for-signing", 0,
+ N_("do not use the PIN cache when signing")},
+ { oAllowMarkTrusted, "allow-mark-trusted", 0,
+@@ -135,7 +137,8 @@
+ };
+
+
+-#define DEFAULT_CACHE_TTL (10*60) /* 10 minutes */
++#define DEFAULT_CACHE_TTL (10*60) /* 10 minutes */
++#define MAX_CACHE_TTL (120*60) /* 2 hours */
+
+ static volatile int caught_fatal_sig = 0;
+
+@@ -342,6 +345,7 @@
+ opt.pinentry_program = NULL;
+ opt.scdaemon_program = NULL;
+ opt.def_cache_ttl = DEFAULT_CACHE_TTL;
++ opt.max_cache_ttl = MAX_CACHE_TTL;
+ opt.ignore_cache_for_signing = 0;
+ opt.allow_mark_trusted = 0;
+ return 1;
+@@ -372,6 +376,7 @@
+ case oScdaemonProgram: opt.scdaemon_program = pargs->r.ret_str; break;
+
+ case oDefCacheTTL: opt.def_cache_ttl = pargs->r.ret_ulong; break;
++ case oMaxCacheTTL: opt.max_cache_ttl = pargs->r.ret_ulong; break;
+
+ case oIgnoreCacheForSigning: opt.ignore_cache_for_signing = 1; break;
+