* pgg.el (pgg-read-passphrase): Refer `pgg-cache-passphrase'.
* pgg-gpg.el, pgg-pgp.el, pgg-pgp5.el (sign-region): Refer
`pgg-cache-passphrase'.
:group 'pgg
:type 'boolean)
+(defcustom pgg-cache-passphrase t
+ "Cache passphrase"
+ :group 'pgg
+ :type 'boolean)
+
(defvar pgg-status-buffer " *PGG status*")
(defvar pgg-errors-buffer " *PGG errors*")
(defvar pgg-output-buffer " *PGG output*")
(progn (beginning-of-line 2)
(point))
(point-max))))))
- (pgg-add-passphrase-cache
- (cdr (assq 'key-identifier packet))
- passphrase))))
+ (if pgg-cache-passphrase
+ (pgg-add-passphrase-cache
+ (cdr (assq 'key-identifier packet))
+ passphrase)))))
))
(luna-define-method verify-region ((scheme pgg-scheme-gpg)
(progn (beginning-of-line 2)
(point))
(point-max))))))
- (pgg-add-passphrase-cache
- (cdr (assq 'key-identifier packet))
- passphrase))))
+ (if pgg-cache-passphrase
+ (pgg-add-passphrase-cache
+ (cdr (assq 'key-identifier packet))
+ passphrase)))))
))
(luna-define-method verify-region ((scheme pgg-scheme-pgp)
(progn (beginning-of-line 2)
(point))
(point-max))))))
- (pgg-add-passphrase-cache
- (cdr (assq 'key-identifier packet))
- passphrase))))
+ (if pgg-cache-passphrase
+ (pgg-add-passphrase-cache
+ (cdr (assq 'key-identifier packet))
+ passphrase)))))
))
(luna-define-method verify-region ((scheme pgg-scheme-pgp5)
(setq pgg-read-passphrase 'read-passwd)
(autoload 'ange-ftp-read-passwd "ange-ftp")
(setq pgg-read-passphrase 'ange-ftp-read-passwd))))
- (or (and key (setq key (pgg-truncate-key-identifier key))
+ (or (and pgg-cache-passphrase
+ key (setq key (pgg-truncate-key-identifier key))
(symbol-value (intern-soft key pgg-passphrase-cache)))
(funcall pgg-read-passphrase prompt)))