2006-04-12 Daiki Ueno <ueno@unixuser.org>
+ * epg.el (epg-status-GET_BOOL): New function.
+ (epg-status-GET_LINE): New function.
+ (epg-prompt-alist): New variable, to be filled.
+
* pgg-epg.el (mml2015-gpg-extract-signature-details): New function.
* epg.el (epg-signature-fingerprint): New function.
(epg-signature-set-fingerprint): New function.
(user-id "[^:]+"))
"The schema of keylisting output whose type is \"uid\".
This is used by `epg-list-keys'.")
+
+(defvar epg-prompt-alist nil)
(defun epg-make-context (&optional protocol armor textmode include-certs)
"Return a context object."
(if string
(fillarray string 0))))))
+(defun epg-status-GET_BOOL (process string)
+ (let ((entry (assoc string epg-prompt-alist)))
+ (if (y-or-n-p (if entry (cdr entry) (concat string "? ")))
+ (process-send-string process "y\n")
+ (process-send-string process "n\n"))))
+
+(defun epg-status-GET_LINE (process string)
+ (let* ((entry (assoc string epg-prompt-alist))
+ (string (read-string (if entry (cdr entry) (concat string ": ")))))
+ (process-send-string process (concat string "\n")))))
+
(defun epg-status-GOODSIG (process string)
(if (string-match "\\`\\([^ ]+\\) \\(.*\\)" string)
(epg-context-set-result-for