* mime-pgp.el (mime-view-application/pgp): Use epg-signature-to-string.
authorueno <ueno>
Thu, 20 Apr 2006 04:12:15 +0000 (04:12 +0000)
committerueno <ueno>
Thu, 20 Apr 2006 04:12:15 +0000 (04:12 +0000)
(mime-verify-application/pgp-signature): Ditto.

ChangeLog
mime-pgp.el

index d50035f..5f789a4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2006-04-20  Daiki Ueno  <ueno@unixuser.org>
 
+       * mime-pgp.el (mime-view-application/pgp): Use epg-signature-to-string.
+       (mime-verify-application/pgp-signature): Ditto.
+
+2006-04-20  Daiki Ueno  <ueno@unixuser.org>
+
        * mime-pgp.el: Require 'epg.
        (mime-view-application/pgp): Use EasyPG.
        (mime-verify-application/pgp-signature): Ditto.
index 2cdb2cb..327efe3 100644 (file)
@@ -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)
           (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)
                   (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
                             (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