2006-04-20 Daiki Ueno <ueno@unixuser.org>
+ * epg.el (epg-signature-to-string): New function.
+
+2006-04-20 Daiki Ueno <ueno@unixuser.org>
+
* epa-file.el (epa-file-write-region): RECIPIENTS is now a list of
key objects.
* epa-dired.el (epa-dired-do-encrypt): RECIPIENTS is now a list of
(message "Verifying %s..." (file-name-nondirectory file))
(epg-verify-file context file plain)
(message "Verifying %s...done" (file-name-nondirectory file))
- (setq signature (reverse (epg-context-result-for context 'verify)))
- (while signature
- (message "%s: %s %s %s"
- (epg-signature-status (car signature))
- (epg-signature-key-id (car signature))
- (epg-signature-user-id (car signature))
- (epg-signature-validity (car signature)))
- (setq signature (cdr signature)))))
+ (message "%s"
+ (mapconcat #'epg-signature-to-string
+ (reverse (epg-context-result-for context 'verify))
+ "\n"))))
(defun epa-sign-file (file detached)
(interactive
(setcdr entry value)
(epg-context-set-result context (cons (cons name value) result)))))
+(defun epg-signature-to-string (signature)
+ (format "%s signature from %s %s%s"
+ (capitalize (symbol-name (epg-signature-status signature)))
+ (epg-signature-key-id signature)
+ (epg-signature-user-id signature)
+ (if (epg-signature-validity signature)
+ (format " (trust %s)"
+ (epg-signature-validity signature))
+ "")))
+
(defun epg-start (context args)
"Start `epg-gpg-program' in a subprocess with given ARGS."
(let* ((args (append (list "--no-tty"