* epg.el (epg-verify-file): Don't use a temp output file.
authorueno <ueno>
Thu, 8 Mar 2007 11:12:54 +0000 (11:12 +0000)
committerueno <ueno>
Thu, 8 Mar 2007 11:12:54 +0000 (11:12 +0000)
(epg-verify-string): Ditto.

ChangeLog
epg.el

index a9b4c51..1240230 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,8 @@
        result.
        (epg--status-DECRYPTION_OKAY): Copy 'plaintext result to
        'decrypted-plaintext.
+       (epg-verify-file): Don't use a temp output file.
+       (epg-verify-string): Ditto.
 
 2007-03-08  Daiki Ueno  <ueno@unixuser.org>
 
diff --git a/epg.el b/epg.el
index d94a4cb..63d40b5 100644 (file)
--- a/epg.el
+++ b/epg.el
@@ -2028,9 +2028,7 @@ stored into the file after successful verification."
   (unwind-protect
       (progn
        (if plain
-           (epg-context-set-output-file context plain)
-         (epg-context-set-output-file context
-                                      (epg--make-temp-file "epg-output")))
+           (epg-context-set-output-file context plain))
        (if signed-text
            (epg-start-verify context
                              (epg-make-data-from-file signature)
@@ -2039,9 +2037,7 @@ stored into the file after successful verification."
                            (epg-make-data-from-file signature)))
        (epg-wait-for-completion context)
        (unless plain
-         (epg-read-output context)))
-    (unless plain
-      (epg-delete-output-file context))
+         (epg-context-result-for context 'plaintext)))
     (epg-reset context)))
 
 ;;;###autoload
@@ -2057,8 +2053,6 @@ successful verification."
        input-file)
     (unwind-protect
        (progn
-         (epg-context-set-output-file context
-                                      (epg--make-temp-file "epg-output"))
          (if signed-text
              (progn
                (setq input-file (epg--make-temp-file "epg-signature"))
@@ -2068,8 +2062,7 @@ successful verification."
                                  (epg-make-data-from-string signed-text)))
            (epg-start-verify context (epg-make-data-from-string signature)))
          (epg-wait-for-completion context)
-         (epg-read-output context))
-      (epg-delete-output-file context)
+         (epg-context-result-for context 'plaintext))
       (if (and input-file
               (file-exists-p input-file))
          (delete-file input-file))