[Mew-dist 16884] Re: s/mime content disposition
Ryutaroh Matsumoto
ryutaroh at example.com
2001年 3月 19日 (月) 00:17:51 JST
以下のパッチなんですが、デバッグ用のprincを一箇所取り忘れているので
b114に対するパッチとして再提出します。
From: Ryutaroh Matsumoto <ryutaroh at example.com>
Subject: [Mew-dist 16875] s/mime content disposition
Date: Sat, 17 Mar 2001 21:43:56 +0900
> S/MIMEの署名で
> Content-Disposition: attachment; filename="smime.p7s"
> となっているべきところが
> Content-Description: attachment; filename="smime.p7s"
> なっていることに気づいたので修正するパッチを作りました。よかったら次の
> ベータリリースに入れてください。
松本 隆太郎
-------------- next part --------------
diff -ru mew-1.95b114/mew-encode.el mew-1.95b114-smime/mew-encode.el
--- mew-1.95b114/mew-encode.el Fri Mar 9 11:07:58 2001
+++ mew-1.95b114-smime/mew-encode.el Mon Mar 19 00:00:57 2001
@@ -749,7 +749,7 @@
(let* ((boundary (mew-security-multipart-boundary depth))
(switch mew-encode-multipart-signed-switch) ;; save length
(func (mew-encode-get-security-func proto switch))
- file1 file2 micalg cte2 fmc errmsg ct2 cd2)
+ file1 file2 micalg cte2 fmc errmsg ct2 cdp2)
(setq file1 (mew-save-transfer-form (point-min) (point-max) 'retain))
;; The narrowed region still the ORIGINAL part (i.e. line breaks are LF)
;; Call the protocol function
@@ -762,7 +762,7 @@
mew-ct-mls mew-temp-dir))))
(setq file2 (nth 0 fmc) cte2 (nth 1 fmc) micalg (nth 2 fmc))
(setq errmsg (nth 3 fmc))
- (setq ct2 (nth 4 fmc) cd2 (nth 5 fmc))
+ (setq ct2 (nth 4 fmc) cdp2 (nth 5 fmc))
(if errmsg
(progn
(if (file-exists-p file1) (delete-file file1))
@@ -782,7 +782,7 @@
;; After the sigend part
(insert (format "\n--%s\n" boundary))
(mew-encode-singlepart
- (mew-encode-syntax-single file2 (or ct2 (list proto)) cte2 cd2))
+ (mew-encode-syntax-single file2 (or ct2 (list proto)) cte2 nil nil cdp2))
(insert (format "\n--%s--\n" boundary))
;; Throw away the garbage
(if (file-exists-p file1) (delete-file file1))
diff -ru mew-1.95b114/mew-smime.el mew-1.95b114-smime/mew-smime.el
--- mew-1.95b114/mew-smime.el Sun Mar 4 21:35:07 2001
+++ mew-1.95b114-smime/mew-smime.el Mon Mar 19 00:00:57 2001
@@ -61,6 +61,8 @@
(defconst mew-smime-passtag "S/MIME")
+(defconst mew-smime-signature-filename "smime.p7s")
+
;; The following variables are used only in the variable
;; mew-decode-multipart-signed-switch in mew-decode.el.
(defvar mew-smime-ver 0)
@@ -96,7 +98,7 @@
(setq mew-smime-running 'signing)
(let ((process-connection-type mew-connection-type2)
file2 process)
- (setq file2 (mew-make-temp-name))
+ (setq file2 (mew-make-temp-name mew-smime-signature-filename))
;; not perfectly unique but OK
(setq process
(mew-start-process-lang
@@ -120,8 +122,8 @@
(discard-input)))
(message "S/MIME signing ... done")
(list file2 mew-b64 "sha1" mew-smime-sign-error
- (list "application/x-pkcs7-signature" (list "name" "smime.p7s"))
- (list "attachment" (list "filename" "smime.p7s"))))));; return
+ (list "application/x-pkcs7-signature" (list "name" mew-smime-signature-filename))
+ t))));; return
(defun mew-smime-verify (file1 file2)
(message "S/MIME verifying ... ")
diff -ru mew-1.95b114/mew-syntax.el mew-1.95b114-smime/mew-syntax.el
--- mew-1.95b114/mew-syntax.el Sun Mar 4 13:30:37 2001
+++ mew-1.95b114-smime/mew-syntax.el Mon Mar 19 00:03:45 2001
@@ -149,7 +149,7 @@
(defun mew-syntax-cdp-format (file ct)
(when file
- (setq file (mew-header-sanity-check-string file))
+ (setq file (file-name-nondirectory (mew-header-sanity-check-string file)))
(if (mew-member-case-equal ct mew-content-disposition-inline-list)
(list "inline" (list "filename" file))
(list "attachment" (list "filename" file)))))
diff -ru mew-1.95b114/mew-vars2.el mew-1.95b114-smime/mew-vars2.el
--- mew-1.95b114/mew-vars2.el Wed Mar 14 12:29:22 2001
+++ mew-1.95b114-smime/mew-vars2.el Mon Mar 19 00:00:57 2001
@@ -326,6 +326,8 @@
mew-prog-mspowerpoint mew-icon-text)
("application/pgp-keys" "\\.pka$" nil
mew-prog-pgp-keys mew-icon-unknown)
+ ("application/x-pkcs7-signature" "\\.p7s$" mew-b64
+ nil mew-icon-unknown)
("application/octet-stream"
"\\.tar$\\|\\.tar\\.gz$\\|\\.tgz$\\|\\.gz$\\|\\.Z$\\|\\.taz$\\|\\.tar\\.bz2?$\\|\\.bz2?$\\|\\.lzh$\\|\\.zip$\\|\\.bin$\\|\\.pgp$|\\.gpg$"
mew-b64 mew-prog-octet-stream mew-icon-application/octet-stream)
-------------- next part --------------
テキスト形式以外の添付ファイルを保管しました...
ファイル名: smime.p7s
型: application/x-pkcs7-signature
サイズ: 3207 バイト
説明: 無し
URL: <http://www.mew.org/pipermail/mew-dist/attachments/20010319/420fee68/attachment.bin>
Mew-dist メーリングリストの案内