X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=smime.el;h=839c7151d65d99921e2011e2e0c6af404b201bd6;hb=4ac9ba769e14a2fa31aa9b71c3e28a02b0a6618d;hp=afa46f8245c44cd91849840c1c67178fffe34051;hpb=a28d01665b35970dac62ceed66ad1fe5cd0b8545;p=elisp%2Fsemi.git diff --git a/smime.el b/smime.el index afa46f8..839c715 100644 --- a/smime.el +++ b/smime.el @@ -39,6 +39,8 @@ ;;; Code: (require 'path-util) +(require 'mel) +;; binary-funcall, binary-write-decoded-region, binary-insert-encoded-file (eval-when-compile (require 'static)) (defgroup smime () @@ -202,11 +204,10 @@ (with-current-buffer (get-buffer-create smime-output-buffer) (buffer-disable-undo) (erase-buffer)) - (let ((coding-system-for-read 'binary) - (coding-system-for-write 'binary)) - (setq process - (apply #'start-process-shell-command "*S/MIME*" - smime-output-buffer program args))) + (setq process + (apply #'binary-funcall #'start-process-shell-command + "*S/MIME*" smime-output-buffer + program args)) (set-process-sentinel process 'ignore) (process-send-region process start end) (process-send-eof process) @@ -302,12 +303,12 @@ the detached signature of the current region." (unwind-protect (progn (set-default-file-modes 448) - (binary-write-region start end orig-file)) + (binary-write-decoded-region start end orig-file)) (set-default-file-modes orig-mode)) (with-temp-buffer - (binary-insert-file-contents signature) + (binary-insert-encoded-file signature) (goto-char (point-max)) - (binary-insert-file-contents + (binary-insert-encoded-file (or (smime-find-certificate (smime-query-signer (point-min)(point-max))) (expand-file-name