The commit
1bf64efe introduced auto detection of actual MIME types
for application/octet-stream. That changes the MIME type of
encrypted part to "text/plain" when it has filename parameter with
".asc", and causes decryption failure.
+2012-05-28 Daiki Ueno <ueno@unixuser.org>
+
+ * mm-decode.el (mm-inhibit-auto-detect-attachment): New variable.
+ (mm-dissect-singlepart): Don't guess the MIME type of
+ application/octet-stream parts if mm-inhibit-auto-detect-attachment is
+ set.
+ (mm-dissect-multipart): Bind mm-inhibit-auto-detect-attachment if the
+ toplevel MIME type is multipart/encrypted.
+
2012-05-27 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-msg.el (gnus-msg-mail): Ensure that gnus-newsgroup-name is
2012-05-27 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-msg.el (gnus-msg-mail): Ensure that gnus-newsgroup-name is
(defvar mm-last-shell-command "")
(defvar mm-content-id-alist nil)
(defvar mm-postponed-undisplay-list nil)
(defvar mm-last-shell-command "")
(defvar mm-content-id-alist nil)
(defvar mm-postponed-undisplay-list nil)
+(defvar mm-inhibit-auto-detect-attachment nil)
;; According to RFC2046, in particular, in a digest, the default
;; Content-Type value for a body part is changed from "text/plain" to
;; According to RFC2046, in particular, in a digest, the default
;; Content-Type value for a body part is changed from "text/plain" to
;; Guess what the type of application/octet-stream parts should
;; really be.
(let ((filename (cdr (assq 'filename (cdr cdl)))))
;; Guess what the type of application/octet-stream parts should
;; really be.
(let ((filename (cdr (assq 'filename (cdr cdl)))))
- (when (and (equal (car ctl) "application/octet-stream")
+ (when (and (not mm-inhibit-auto-detect-attachment)
+ (equal (car ctl) "application/octet-stream")
filename
(string-match "\\.\\([^.]+\\)$" filename))
(let ((new-type (mailcap-extension-to-mime (match-string 1 filename))))
filename
(string-match "\\.\\([^.]+\\)$" filename))
(let ((new-type (mailcap-extension-to-mime (match-string 1 filename))))
(goto-char (point-max))
(if (re-search-backward close-delimiter nil t)
(match-beginning 0)
(goto-char (point-max))
(if (re-search-backward close-delimiter nil t)
(match-beginning 0)
+ (point-max))))
+ (mm-inhibit-auto-detect-attachment
+ (equal (car ctl) "multipart/encrypted")))
(setq boundary (concat (regexp-quote boundary) "[ \t]*$"))
(while (and (< (point) end) (re-search-forward boundary end t))
(goto-char (match-beginning 0))
(setq boundary (concat (regexp-quote boundary) "[ \t]*$"))
(while (and (< (point) end) (re-search-forward boundary end t))
(goto-char (match-beginning 0))