From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/81854 Path: news.gmane.org!not-for-mail From: Luis Henriques Newsgroups: gmane.emacs.gnus.general Subject: Re: Problems trying to decrypt email Date: Thu, 24 May 2012 10:02:25 +0100 Message-ID: <87hav6q7dq.fsf@camandro.org> References: <877gw4wq33.fsf@camandro.org> <87d35vn640.fsf@camandro.org> <877gw3n5wr.fsf@camandro.org> <87txz7s08q.fsf@camandro.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1337850257 15118 80.91.229.3 (24 May 2012 09:04:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 24 May 2012 09:04:17 +0000 (UTC) Cc: ding@gnus.org To: Daiki Ueno Original-X-From: ding-owner+M30124@lists.math.uh.edu Thu May 24 11:04:17 2012 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SXTxv-0003rb-S7 for ding-account@gmane.org; Thu, 24 May 2012 11:04:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1SXTwS-0008Pj-LQ; Thu, 24 May 2012 04:02:44 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1SXTwQ-0008PZ-0d for ding@lists.math.uh.edu; Thu, 24 May 2012 04:02:42 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1SXTwL-0004Qn-G5 for ding@lists.math.uh.edu; Thu, 24 May 2012 04:02:41 -0500 Original-Received: from haggis.mythic-beasts.com ([93.93.131.52]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1SXTwE-0005Q8-7o for ding@gnus.org; Thu, 24 May 2012 11:02:30 +0200 Original-Received: from [94.13.107.236] (helo=localhost) by haggis.mythic-beasts.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1SXTwA-0006Dz-RR; Thu, 24 May 2012 10:02:27 +0100 In-Reply-To: (Daiki Ueno's message of "Thu, 24 May 2012 10:56:15 +0900") User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1.50 (gnu/linux) X-BlackCat-Spam-Score: -12 X-Mythic-Debug: Threshold = On = X-Spam-Status: No, score=-1.3 X-Spam-Score: -3.2 (---) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:81854 Archived-At: Daiki Ueno writes: > Luis Henriques writes: > >>>> I forgot to refer the different behaviour between the 2 Gnus versions: >>>> >>>> - Gnus shipped with Emacs: >>>> I select the email (summary buffer) and I get the question "Decrypt >>>> (PGP) part? (y or n)". When I answer 'y', I'm asked for the >>>> passphrase and get the email decrypted >>>> >>>> - Ma Gnus: >>>> I get the same question ("Decrypt (PGP) part? (y or n)") and when I >>>> reply 'y', I get another question: "Decrypt pgp encrypted part? (y >>>> or n)". Only after answering 'y' to this question I'm asked for the >>>> passphrase. >>> >>> Can't reproduce it with either Gnus shipped with Emacs (bzr trunk) nor Ma >>> Gnus (git master). > >> I've sent you (privately) an encrypted email. > > Thanks, I could reproduce it. It seems indeed to be caused by the > recent changes to Ma Gnus: > > 2012-02-16 Lars Ingebrigtsen > > * mm-decode.el (mm-dissect-singlepart): Guess what the type of > application/octet-stream parts really is. > > I'm attaching a patch. Lars? Great, thanks a lot! I confirm this has solved the problem -- I am now able to successfully decrypt emails with this patch applied. Cheers, -- Luis > From c08fe16a3e5c84195d449ee65e2bf33104cc870e Mon Sep 17 00:00:00 2001 > From: Daiki Ueno > Date: Thu, 24 May 2012 10:45:38 +0900 > Subject: [PATCH] mm-decode: don't touch MIME type for multipart/encrypted > children > > 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. > --- > lisp/mm-decode.el | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el > index 8076b2e..0ac3254 100644 > --- a/lisp/mm-decode.el > +++ b/lisp/mm-decode.el > @@ -458,6 +458,7 @@ If not set, `default-directory' will be used." > (defvar mm-last-shell-command "") > (defvar mm-content-id-alist nil) > (defvar mm-postponed-undisplay-list nil) > +(defvar mm-inhibit-auto-detect-attachement nil) > > ;; According to RFC2046, in particular, in a digest, the default > ;; Content-Type value for a body part is changed from "text/plain" to > @@ -668,7 +669,8 @@ MIME-Version header before proceeding." > ;; 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-attachement) > + (equal (car ctl) "application/octet-stream") > filename > (string-match "\\.\\([^.]+\\)$" filename)) > (let ((new-type (mailcap-extension-to-mime (match-string 1 filename)))) > @@ -694,7 +696,9 @@ MIME-Version header before proceeding." > (goto-char (point-max)) > (if (re-search-backward close-delimiter nil t) > (match-beginning 0) > - (point-max))))) > + (point-max)))) > + (mm-inhibit-auto-detect-attachement > + (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)) > -- > 1.7.10.1 > > > Regards,