[EMIKO] can't encrypt
Akihiro Arisawa
ari @ atesoft.advantest.co.jp
1999年 11月 6日 (土) 16:22:08 JST
有沢です。
cvsから取得したEMIKOを使っていますが、私の元では暗号化に際して
以下の問題がありました。
(1) Fromフィールドがあり、括弧でコメントを書いているとエラーになる。
(2) Toフィールドに複数のメールアドレスを記述した時に暗号化できない。
(1) UserAgentの環境で、(setq message-generate-headers-first t)と
してMessageのbufferが作成された時点で
「From: ari @ mei9.advantest.co.jp (Akihiro Arisawa)」と入るように
しています。この場合、暗号化時に、Fromフィールドの値をそのまま
渡してshでこけているようです。
(2) 「To: ari @ mei9.advantest.co.jp, ari @ atesoft.advantest.co.jp」
としたところ、"ari @ mei9.advantest.co.jp, ari @ atesoft.advantest.co.jp"
とメールアドレスを連結したままで鍵を探してしまっているようです。
そのため、Fromのアドレスの鍵だけを使って暗号化してしまうみたいです。
-------------- next part --------------
Signaling: (file-error "Opening input file" "no such file or directory" "/tmp/pgg-errors78091Wb")
insert-file-contents("/tmp/pgg-errors78091Wb")
(save-current-buffer (set-buffer output-buffer) (goto-char (point-min)) (while (search-forward "
$" nil t) (replace-match "")) (if (memq status ...) (error "%s exited abnormally: '%s'" program exit-status)) (if (= 127 exit-status) (error "%s could not be found" program)) (set-buffer (get-buffer-create errors-buffer)) (buffer-disable-undo) (erase-buffer) (insert-file-contents errors-file-name) (delete-file errors-file-name) (set-buffer (get-buffer-create status-buffer)) (buffer-disable-undo) (erase-buffer) (insert-file-contents status-file-name) (delete-file status-file-name) (if (and process ...) (interrupt-process process)))
(with-current-buffer output-buffer (goto-char (point-min)) (while (search-forward "
$" nil t) (replace-match "")) (if (memq status ...) (error "%s exited abnormally: '%s'" program exit-status)) (if (= 127 exit-status) (error "%s could not be found" program)) (set-buffer (get-buffer-create errors-buffer)) (buffer-disable-undo) (erase-buffer) (insert-file-contents errors-file-name) (delete-file errors-file-name) (set-buffer (get-buffer-create status-buffer)) (buffer-disable-undo) (erase-buffer) (insert-file-contents status-file-name) (delete-file status-file-name) (if (and process ...) (interrupt-process process)))
(let* ((errors-file-name ...) (status-file-name ...) (args ...) (shell-file-name pgg-gpg-shell-file-name) (shell-command-switch pgg-gpg-shell-command-switch) (output-buffer pgg-output-buffer) (errors-buffer pgg-errors-buffer) (status-buffer pgg-status-buffer) (process-connection-type nil) process status exit-status) (with-current-buffer (get-buffer-create output-buffer) (buffer-disable-undo) (erase-buffer)) (setq process (apply ... "*GnuPG*" output-buffer program args)) (set-process-sentinel process (quote ignore)) (when passphrase (process-send-string process ...)) (process-send-region process start end) (process-send-eof process) (while (eq ... ...) (accept-process-output process 5)) (setq status (process-status process) exit-status (process-exit-status process)) (delete-process process) (with-current-buffer output-buffer (goto-char ...) (while ... ...) (if ... ...) (if ... ...) (set-buffer ...) (buffer-disable-undo) (erase-buffer) (insert-file-contents errors-file-name) (delete-file errors-file-name) (set-buffer ...) (buffer-disable-undo) (erase-buffer) (insert-file-contents status-file-name) (delete-file status-file-name) (if ... ...)))
pgg-gpg-process-region(353 353 nil "gpg" ("--with-colons" "--no-greeting" "--batch" "--list-secret-keys" "ari @ atesoft.advantest.co.jp (Akihiro Arisawa)"))
(let ((args ...)) (pgg-gpg-process-region (point) (point) nil pgg-gpg-program args) (with-current-buffer pgg-output-buffer (goto-char ...) (when ... ...)))
(lambda (scheme string &optional type) (let (...) (pgg-gpg-process-region ... ... nil pgg-gpg-program args) (with-current-buffer pgg-output-buffer ... ...)))([pgg-scheme-gpg [0 0 0 0 0 0 0]] "ari @ atesoft.advantest.co.jp (Akihiro Arisawa)" encrypt)
apply((lambda (scheme string &optional type) (let (...) (pgg-gpg-process-region ... ... nil pgg-gpg-program args) (with-current-buffer pgg-output-buffer ... ...))) ([pgg-scheme-gpg [0 0 0 0 0 0 0]] "ari @ atesoft.advantest.co.jp (Akihiro Arisawa)" encrypt))
luna-send([pgg-scheme-gpg [0 0 0 0 0 0 0]] lookup-key-string [pgg-scheme-gpg [0 0 0 0 0 0 0]] "ari @ atesoft.advantest.co.jp (Akihiro Arisawa)" encrypt)
(pgg-read-passphrase (format "GnuPG passphrase for %s: " pgg-gpg-user-id) (luna-send scheme (quote lookup-key-string) scheme pgg-gpg-user-id (quote encrypt)))
(let* ((pgg-gpg-user-id pgg-default-user-id) (passphrase ...) (args ...) (inhibit-read-only t) buffer-read-only) (goto-char start) (setq end (set-marker ... ...)) (while (progn ... ...) (insert "
") (forward-line 1)) (pgg-gpg-process-region start end passphrase pgg-gpg-program args) (goto-char start) (while (re-search-forward "
$" end t) (replace-match "")) (pgg-process-when-success (goto-char ...) (while ... ...) (let ... ...)))
(lambda (scheme start end recipients) (let* (... ... ... ... buffer-read-only) (goto-char start) (setq end ...) (while ... ... ...) (pgg-gpg-process-region start end passphrase pgg-gpg-program args) (goto-char start) (while ... ...) (pgg-process-when-success ... ... ...)))([pgg-scheme-gpg [0 0 0 0 0 0 0]] 228 367 ("ari @ mei9.advantest.co.jp"))
apply((lambda (scheme start end recipients) (let* (... ... ... ... buffer-read-only) (goto-char start) (setq end ...) (while ... ... ...) (pgg-gpg-process-region start end passphrase pgg-gpg-program args) (goto-char start) (while ... ...) (pgg-process-when-success ... ... ...))) ([pgg-scheme-gpg [0 0 0 0 0 0 0]] 228 367 ("ari @ mei9.advantest.co.jp")))
luna-send([pgg-scheme-gpg [0 0 0 0 0 0 0]] encrypt-region [pgg-scheme-gpg [0 0 0 0 0 0 0]] 228 367 ("ari @ mei9.advantest.co.jp"))
(let* ((entity ...) (status ...)) (when (interactive-p) (if status ... ...)) status)
pgg-encrypt-region(228 367 ("ari @ mei9.advantest.co.jp"))
(let ((pgg-default-user-id ...)) (pgg-encrypt-region (point-min) (point-max) recipients))
(or (let (...) (pgg-encrypt-region ... ... recipients)) (throw (quote mime-edit-error) (quote pgp-error)))
(let* ((ret ...) (ctype ...) (encoding ...) (pgp-boundary ...)) (goto-char beg) (insert header) (insert (format "Content-Type: %s\n" ctype)) (if encoding (insert ...)) (insert "\n") (or (let ... ...) (throw ... ...)) (delete-region (point-min) (point-max)) (goto-char beg) (insert (format "--[[multipart/encrypted;\n boundary=\"%s\";\n protocol=\"application/pgp-encrypted\"][7bit]]\n--%s\nContent-Type: application/pgp-encrypted\n\n--%s\nContent-Type: application/octet-stream\nContent-Transfer-Encoding: 7bit\n\n" pgp-boundary pgp-boundary pgp-boundary)) (insert-buffer-substring pgg-output-buffer) (goto-char (point-max)) (insert (format "\n--%s--\n" pgp-boundary)))
(let (from recipients header) (let (...) (setq from ... recipients ... header ...)) (narrow-to-region beg end) (let* (... ... ... ...) (goto-char beg) (insert header) (insert ...) (if encoding ...) (insert "\n") (or ... ...) (delete-region ... ...) (goto-char beg) (insert ...) (insert-buffer-substring pgg-output-buffer) (goto-char ...) (insert ...)))
(save-restriction (let (from recipients header) (let ... ...) (narrow-to-region beg end) (let* ... ... ... ... ... ... ... ... ... ... ... ... ...)))
(save-excursion (save-restriction (let ... ... ... ...)))
mime-edit-encrypt-pgp-mime(228 242 "Multipart_Sat_Nov__6_15:37:41_1999-1")
(cond ((string-equal type "quote") (mime-edit-enquote-region bb eb)) ((string-equal type "pgp-signed") (mime-edit-sign-pgp-mime bb eb boundary)) ((string-equal type "pgp-encrypted") (mime-edit-encrypt-pgp-mime bb eb boundary)) ((string-equal type "kazu-signed") (mime-edit-sign-pgp-kazu bb eb boundary)) ((string-equal type "kazu-encrypted") (mime-edit-encrypt-pgp-kazu bb eb boundary)) (t (setq boundary ...) (goto-char bb) (insert ...)))
(let ((type ...) (bb ...) (be ...) (eb ...)) (narrow-to-region bb eb) (delete-region bb be) (setq bb (point-min)) (setq eb (point-max)) (widen) (goto-char eb) (if (looking-at mime-edit-multipart-end-regexp) (let ... ... ...)) (cond (... ...) (... ...) (... ...) (... ...) (... ...) (t ... ... ...)) boundary)
(if ret (let (... ... ... ...) (narrow-to-region bb eb) (delete-region bb be) (setq bb ...) (setq eb ...) (widen) (goto-char eb) (if ... ...) (cond ... ... ... ... ... ...) boundary))
(let ((ret ...)) (if ret (let ... ... ... ... ... ... ... ... ... boundary)))
mime-edit-process-multipart-1("Multipart_Sat_Nov__6_15:37:41_1999-1")
(while (mime-edit-process-multipart-1 (format "%s-%d" boundary i)) (setq i (1+ i)))
(let ((boundary ...) (i 1) ret) (while (mime-edit-process-multipart-1 ...) (setq i ...)) (save-restriction (let* ... ...)) (mime-edit-dequote-region (point-min) (point-max)) (let (... ...) (and mime-edit-insert-user-agent-field ...) (or ... ...) (save-restriction ... ... ... ... ... ...) (mail-position-on-field "Content-Type") (insert contype) (if encoding ...)))
(save-excursion (let (... ... ret) (while ... ...) (save-restriction ...) (mime-edit-dequote-region ... ...) (let ... ... ... ... ... ... ...)))
mime-edit-translate-body()
run-hooks(mime-edit-translate-buffer-hook)
(save-excursion (run-hooks (quote mime-edit-translate-buffer-hook)))
(catch (quote mime-edit-error) (save-excursion (run-hooks ...)))
(if (catch (quote mime-edit-error) (save-excursion ...)) (progn (undo) (error "Translation error!")))
mime-edit-translate-buffer()
(let* ((str ...) (separator mail-header-separator) (the-buf ...) (buf-name ...) (temp-buf-name ...) (buf ...) (pgp-processing mime-edit-pgp-processing)) (if buf (progn ... ...) (setq buf ...) (switch-to-buffer buf)) (insert str) (setq major-mode (quote mime-temp-message-mode)) (make-local-variable (quote mail-header-separator)) (setq mail-header-separator separator) (make-local-variable (quote mime-edit-buffer)) (setq mime-edit-buffer the-buf) (setq mime-edit-pgp-processing pgp-processing) (run-hooks (quote mime-edit-translate-hook)) (mime-edit-translate-buffer) (goto-char (point-min)) (if (re-search-forward ...) (replace-match "")) (mime-view-buffer))
mime-edit-preview-message()
* call-interactively(mime-edit-preview-message)
-------------- next part --------------
/bin/sh: 構文エラー at line 1: `(' unexpected
-------------- next part --------------
gpg: ari @ mei9.advantest.co.jp, ari @ atesoft.advantest.co.jp: skipped: public key not found
gpg: [stdin]: encryption failed: public key not found
-------------- next part --------------
#暗号化する時にパスフレーズを入れなきゃならないのも
#ちょっと気になったり。
--
(株)アドバンテスト 有沢 明宏
有澤 明宏 (E-mail: ari @ atesoft.advantest.co.jp)
More information about the Emacs-mime-ja
mailing list