From: ueno Date: Thu, 20 Apr 2006 04:11:39 +0000 (+0000) Subject: * epg.el (epg-signature-to-string): New function. X-Git-Tag: epgsm-branchpoint~19 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1fe277497593c8fee7d6623917a8f249538a9888;p=elisp%2Fepg.git * epg.el (epg-signature-to-string): New function. --- diff --git a/ChangeLog b/ChangeLog index eb4fb26..d8e1507 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-04-20 Daiki Ueno + * epg.el (epg-signature-to-string): New function. + +2006-04-20 Daiki Ueno + * 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 diff --git a/epa.el b/epa.el index 87ed7b5..6549e40 100644 --- a/epa.el +++ b/epa.el @@ -437,14 +437,10 @@ (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 diff --git a/epg.el b/epg.el index d1d9160..486ab79 100644 --- a/epg.el +++ b/epg.el @@ -406,6 +406,16 @@ This function is for internal use only." (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"