From: ueno Date: Thu, 20 Apr 2006 04:12:15 +0000 (+0000) Subject: * mime-pgp.el (mime-view-application/pgp): Use epg-signature-to-string. X-Git-Tag: emiko-1_14_1-epg-0_0_1~7 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1060d04a99580afcfad148ae1e527ac80e428467;p=elisp%2Fsemi.git * mime-pgp.el (mime-view-application/pgp): Use epg-signature-to-string. (mime-verify-application/pgp-signature): Ditto. --- diff --git a/ChangeLog b/ChangeLog index d50035f..5f789a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2006-04-20 Daiki Ueno + * mime-pgp.el (mime-view-application/pgp): Use epg-signature-to-string. + (mime-verify-application/pgp-signature): Ditto. + +2006-04-20 Daiki Ueno + * mime-pgp.el: Require 'epg. (mime-view-application/pgp): Use EasyPG. (mime-verify-application/pgp-signature): Ditto. diff --git a/mime-pgp.el b/mime-pgp.el index 2cdb2cb..327efe3 100644 --- a/mime-pgp.el +++ b/mime-pgp.el @@ -76,7 +76,7 @@ (format "%s-%s" (buffer-name) (mime-entity-number entity))) (mother (current-buffer)) (preview-buffer (concat "*Preview-" (buffer-name) "*")) - representation-type message-buf context signature plain) + representation-type message-buf context plain) (set-buffer (setq message-buf (get-buffer-create new-name))) (erase-buffer) (mime-insert-entity entity) @@ -87,15 +87,10 @@ (epg-verify-string context (buffer-substring (match-beginning 0)(point-max))) - (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")) (goto-char (point-min)) (delete-region (point-min) @@ -145,8 +140,7 @@ (1- knum) (1+ knum))) (orig-entity (nth onum (mime-entity-children mother))) - (context (epg-make-context)) - signature) + (context (epg-make-context))) (epg-verify-string context (mime-entity-content entity) (with-temp-buffer @@ -154,15 +148,10 @@ (set-buffer-multibyte nil)) (mime-insert-entity orig-entity) (buffer-substring))) - (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")))) ;;; @ Internal method for application/pgp-encrypted