update.
[elisp/semi.git] / pgg-gpg.el
index 60493bd..d6bda0d 100644 (file)
     (with-current-buffer (get-buffer-create output-buffer)
       (buffer-disable-undo)
       (erase-buffer))
-    (setq process
-         (apply #'start-process-shell-command "*GnuPG*" output-buffer
-                program args))
+    (as-binary-process
+     (setq process
+          (apply #'start-process-shell-command "*GnuPG*" output-buffer
+                 program args)))
     (set-process-sentinel process 'ignore)
     (when passphrase
       (process-send-string process (concat passphrase "\n")))
                             (progn (beginning-of-line 2)
                                    (point))
                             (point-max))))))
-         (pgg-add-passphrase-cache 
-          (cdr (assq 'key-identifier packet))
-          passphrase))))
+         (if pgg-cache-passphrase
+             (pgg-add-passphrase-cache 
+              (cdr (assq 'key-identifier packet))
+              passphrase)))))
     ))
 
 (luna-define-method verify-region ((scheme pgg-scheme-gpg) 
 (provide 'pgg-gpg)
 
 ;;; pgg-gpg.el ends here
-