diff -ru gnus/lisp/pgg-def.el mygnus/lisp/pgg-def.el --- gnus/lisp/pgg-def.el 2002-10-30 00:06:05.000000000 -0500 +++ mygnus/lisp/pgg-def.el 2002-10-30 00:05:09.000000000 -0500 @@ -58,10 +58,10 @@ :group 'pgg :type 'boolean) -(defcustom pgg-cache-passphrase t - "If t, cache passphrase." +(defcustom pgg-passphrase-cache-expiry 60 + "If nonzero, cache passphrase for this many seconds." :group 'pgg - :type 'boolean) + :type 'integer) (defvar pgg-messages-coding-system nil "Coding system used when reading from a PGP external process.") diff -ru gnus/lisp/pgg-gpg.el mygnus/lisp/pgg-gpg.el --- gnus/lisp/pgg-gpg.el 2002-10-30 00:06:05.000000000 -0500 +++ mygnus/lisp/pgg-gpg.el 2002-10-30 00:05:09.000000000 -0500 @@ -98,7 +98,7 @@ (set-default-file-modes orig-mode)))) (defun pgg-gpg-possibly-cache-passphrase (passphrase) - (if (and pgg-cache-passphrase + (if (and (not (eq pgg-passphrase-cache-expiry 0)) (progn (goto-char (point-min)) (re-search-forward "^\\[GNUPG:] GOOD_PASSPHRASE\\>" nil t))) diff -ru gnus/lisp/pgg-pgp.el mygnus/lisp/pgg-pgp.el --- gnus/lisp/pgg-pgp.el 2002-10-30 00:06:06.000000000 -0500 +++ mygnus/lisp/pgg-pgp.el 2002-10-30 00:05:09.000000000 -0500 @@ -177,7 +177,7 @@ (progn (beginning-of-line 2) (point)) (point-max)))))) - (if pgg-cache-passphrase + (if (not (eq pgg-passphrase-cache-expiry 0)) (pgg-add-passphrase-cache (cdr (assq 'key-identifier packet)) passphrase))))))) diff -ru gnus/lisp/pgg-pgp5.el mygnus/lisp/pgg-pgp5.el --- gnus/lisp/pgg-pgp5.el 2002-10-30 00:06:06.000000000 -0500 +++ mygnus/lisp/pgg-pgp5.el 2002-10-30 00:05:09.000000000 -0500 @@ -189,7 +189,7 @@ (progn (beginning-of-line 2) (point)) (point-max)))))) - (if pgg-cache-passphrase + (if (not (eq pgg-passphrase-cache-expiry 0)) (pgg-add-passphrase-cache (cdr (assq 'key-identifier packet)) passphrase))))))) diff -ru gnus/lisp/pgg.el mygnus/lisp/pgg.el --- gnus/lisp/pgg.el 2002-10-30 00:06:06.000000000 -0500 +++ mygnus/lisp/pgg.el 2002-10-30 00:05:09.000000000 -0500 @@ -99,7 +99,7 @@ (setq pgg-read-passphrase 'read-passwd) (autoload 'ange-ftp-read-passwd "ange-ftp") (setq pgg-read-passphrase 'ange-ftp-read-passwd)))) - (or (and pgg-cache-passphrase + (or (and (not (eq pgg-passphrase-cache-expiry 0)) key (setq key (pgg-truncate-key-identifier key)) (symbol-value (intern-soft key pgg-passphrase-cache))) (funcall pgg-read-passphrase prompt)))