* pgg-def.el (pgg-cache-passphrase): New user option.
authorueno <ueno>
Sat, 20 Nov 1999 11:43:37 +0000 (11:43 +0000)
committerueno <ueno>
Sat, 20 Nov 1999 11:43:37 +0000 (11:43 +0000)
* pgg.el (pgg-read-passphrase): Refer `pgg-cache-passphrase'.

* pgg-gpg.el, pgg-pgp.el, pgg-pgp5.el (sign-region): Refer
`pgg-cache-passphrase'.

pgg-def.el
pgg-gpg.el
pgg-pgp.el
pgg-pgp5.el
pgg.el

index 56e53e6..c8fef62 100644 (file)
   :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*")
index a2fb864..d6bda0d 100644 (file)
                             (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) 
index feadb9b..3ba9a96 100644 (file)
                             (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) 
index 9614b4e..fc8566e 100644 (file)
                             (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) 
diff --git a/pgg.el b/pgg.el
index e2e1123..2b4257c 100644 (file)
--- a/pgg.el
+++ b/pgg.el
@@ -201,7 +201,8 @@ and END to the keyring.")
            (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)))