passphrase-callback-function.
2006-04-18 Daiki Ueno <ueno@unixuser.org>
2006-04-18 Daiki Ueno <ueno@unixuser.org>
+ * epg.el (epg-status-GET_HIDDEN): Don't pass KEY-ID to
+ passphrase-callback-function.
+
+2006-04-18 Daiki Ueno <ueno@unixuser.org>
+
* epa.el (epa-export-keys): New command.
* epg.el (epg-start-export-keys): Accept a list of epg-key object
instead of a regexp.
* epa.el (epa-export-keys): New command.
* epg.el (epg-start-export-keys): Accept a list of epg-key object
instead of a regexp.
(defvar epa-file-passphrase-alist nil)
(defvar epa-file-passphrase-alist nil)
-(defun epa-file-passphrase-callback-function (key-id file)
- (if (eq key-id 'SYM)
+(defun epa-file-passphrase-callback-function (file)
+ (if (eq epg-key-id 'SYM)
(let ((entry (assoc file epa-file-passphrase-alist))
passphrase)
(or (copy-sequence (cdr entry))
(let ((entry (assoc file epa-file-passphrase-alist))
passphrase)
(or (copy-sequence (cdr entry))
(setq entry (list file)
epa-file-passphrase-alist (cons entry
epa-file-passphrase-alist)))
(setq entry (list file)
epa-file-passphrase-alist (cons entry
epa-file-passphrase-alist)))
- (setq passphrase (epg-passphrase-callback-function key-id nil))
+ (setq passphrase (epg-passphrase-callback-function nil))
(setcdr entry (copy-sequence passphrase))
passphrase)))
(setcdr entry (copy-sequence passphrase))
passphrase)))
- (epg-passphrase-callback-function key-id nil)))
+ (epg-passphrase-callback-function nil)))
(defun epa-file-handler (operation &rest args)
(save-match-data
(defun epa-file-handler (operation &rest args)
(save-match-data
(funcall (if (consp (epg-context-passphrase-callback epg-context))
(car (epg-context-passphrase-callback epg-context))
(epg-context-passphrase-callback epg-context))
(funcall (if (consp (epg-context-passphrase-callback epg-context))
(car (epg-context-passphrase-callback epg-context))
(epg-context-passphrase-callback epg-context))
(if (consp (epg-context-passphrase-callback epg-context))
(cdr (epg-context-passphrase-callback epg-context)))))
string)
(if (consp (epg-context-passphrase-callback epg-context))
(cdr (epg-context-passphrase-callback epg-context)))))
string)
(cons (cons 'delete-problem (string-to-number (match-string 1 string)))
(epg-context-result-for epg-context 'error)))))
(cons (cons 'delete-problem (string-to-number (match-string 1 string)))
(epg-context-result-for epg-context 'error)))))
-(defun epg-passphrase-callback-function (key-id handback)
+(defun epg-passphrase-callback-function (handback)
+ (if (eq epg-key-id 'SYM)
"Passphrase for symmetric encryption: "
"Passphrase for symmetric encryption: "
+ (if (eq epg-key-id 'PIN)
- (let ((entry (assoc key-id epg-user-id-alist)))
+ (let ((entry (assoc epg-key-id epg-user-id-alist)))
- (format "Passphrase for %s %s: " key-id (cdr entry))
- (format "Passphrase for %s: " key-id)))))))
+ (format "Passphrase for %s %s: " epg-key-id (cdr entry))
+ (format "Passphrase for %s: " epg-key-id)))))))
(defun epg-progress-callback-function (what char current total handback)
(message "%s: %d%%/%d%%" what current total))
(defun epg-progress-callback-function (what char current total handback)
(message "%s: %d%%/%d%%" what current total))