Sounds good to me. Any thoughts from others?
On 2004-01-19 15:08:31 +1100, Ben Elliston wrote:
> From: Ben Elliston <bje+dated+1074917314.d5e4f1@xxxxxxxxxx>
> To: mutt-dev@xxxxxxxx
> Date: Mon, 19 Jan 2004 15:08:31 +1100
> Subject: PGP timeout patch
> X-Spam-Level: *
>
> The following (rough) patch refines the PGP passphrase timeout
> mechanism, such that sending a message with a cached passphrase will
> restart the expiry timer. This has the advantage that:
>
> * sending a continuous stream of messages will prevent Mutt
> from repeatedly asking for the passphrase, irritating the user;
>
> * the user can choose a much lower timeout value as a result.
>
> If the idea of this patch is acceptable, I will tidy it up, make sure
> that the patch applies cleanly to CVS head and test it.
>
> Cheers, Ben
>
> --- pgp.c.orig 2002-01-10 02:39:28.000000000 +1100
> +++ pgp.c
> @@ -55,7 +55,7 @@
>
>
> char PgpPass[STRING];
> -static time_t PgpExptime = 0; /* when does the cached passphrase expire? */
> +time_t PgpExptime = 0; /* when does the cached passphrase expire? */
>
> void pgp_void_passphrase (void)
> {
>
> --- send.c.orig 2002-01-31 09:50:59.000000000 +1100
> +++ send.c
> @@ -1611,6 +1611,13 @@ full_fcc:
> }
> }
>
> +#ifdef HAVE_PGP
> + {
> + /* Extend the expiry time while messages keep getting sent. */
> + extern time_t PgpExptime;
> + PgpExptime = time (NULL) + PgpTimeout;
> + }
> +#endif /* HAVE_PGP */
>
> rv = 0;
--
Thomas Roessler · Personal soap box at <http://log.does-not-exist.org/>.
Attachment:
pgpYeb0GFEbux.pgp
Description: PGP signature