From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Uwe Brauer Newsgroups: gmane.emacs.bugs Subject: bug#41659: [ASCII is ok] Date: Wed, 10 Jun 2020 17:49:15 +0200 Message-ID: <878sguapl0.fsf@mat.ucm.es> References: <87zh9mj5r1.fsf@mat.ucm.es> <874krs5pkg.fsf@mat.ucm.es> <875zc5tsc7.fsf_-_@mat.ucm.es> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="82808"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: 41659@debbugs.gnu.org Cancel-Lock: sha1:GKJCjpOF16mlt1oLvnnioSccals= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 10 17:50:21 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jj2zb-000LTK-Ci for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Jun 2020 17:50:19 +0200 Original-Received: from localhost ([::1]:54116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jj2za-0007bz-A7 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Jun 2020 11:50:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53584) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jj2zL-0007aS-4h for bug-gnu-emacs@gnu.org; Wed, 10 Jun 2020 11:50:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51837) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jj2zK-00034D-Aw for bug-gnu-emacs@gnu.org; Wed, 10 Jun 2020 11:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jj2zK-0001uR-8L for bug-gnu-emacs@gnu.org; Wed, 10 Jun 2020 11:50:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87zh9mj5r1.fsf@mat.ucm.es> Resent-From: Uwe Brauer Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Jun 2020 15:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41659 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15918041677289 (code B ref -1); Wed, 10 Jun 2020 15:50:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Jun 2020 15:49:27 +0000 Original-Received: from localhost ([127.0.0.1]:35150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jj2yl-0001tV-40 for submit@debbugs.gnu.org; Wed, 10 Jun 2020 11:49:27 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:54848) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jj2yi-0001tM-Vj for submit@debbugs.gnu.org; Wed, 10 Jun 2020 11:49:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53202) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jj2yi-0006oi-Ay for bug-gnu-emacs@gnu.org; Wed, 10 Jun 2020 11:49:24 -0400 Original-Received: from ciao.gmane.io ([159.69.161.202]:58462) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jj2yg-0002vK-LZ for bug-gnu-emacs@gnu.org; Wed, 10 Jun 2020 11:49:23 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1jj2yc-000KBL-OM for bug-gnu-emacs@gnu.org; Wed, 10 Jun 2020 17:49:18 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: bug-gnu-emacs@gnu.org Mail-Copies-To: never Received-SPF: pass client-ip=159.69.161.202; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/10 11:27:11 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:181819 Archived-At: --=-=-= Content-Type: text/plain >>> "UB" == Uwe Brauer writes: >>> "UB" == Uwe Brauer writes: >>> "UB" == Uwe Brauer writes: Hi Lars, I just had an interchange of smime encrypted and signed messages with Jens Lechtenboerger. He confirms that a message with latin-1 chars, which is encrypted and signed, is not correctly decrypted in the sense that the latin-1 chars are not correctly displayed and superflusios text is added. The culprits are (defun mm-possibly-verify-or-decrypt (parts ctl &optional from) And the following commits commit 4ce81556b7ad7f7f8c8bb07a7a935114bbe850d0 Author: Lars Ingebrigtsen Date: Mon Sep 23 18:23:22 2019 +0200 Make mm-possibly-verify-or-decrypt pass decryption error * lisp/gnus/mm-decode.el (mm-possibly-verify-or-decrypt): If there's an error, report the error back in a new part (bug#25649). Now message cannot be decrypted anymore ** Git repaired commit 84ef1ea8b524f8998fc8674b99cf8069e38dce4f (HEAD) Author: Lars Ingebrigtsen Date: Thu Sep 26 16:24:29 2019 +0200 Make it possible to view S/MIME verified emails * lisp/gnus/mm-decode.el (mm-possibly-verify-or-decrypt): When dissecting the result, we need a header (bug#18393). * lisp/gnus/mm-view.el (mm-view-pkcs7-verify): Insert the verified string. * lisp/gnus/smime.el (smime-verify-region): Return the verified string. Message can be decrypted, but latin-1 chars are not decoded. If you want we can run some experiements, but you need to have a smime certificate installed. For me it is so annoying that I partially reverted these commits in the latest emacs master. Here is the diff (I would not call it a patch). Regards Uwe Brauer --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=mm-decode-works-master.diff --- mm-decode.el 2020-06-07 13:16:45.973266246 +0200 +++ mm-decode-patched.el 2020-06-07 13:15:56.861220757 +0200 @@ -1680,8 +1680,8 @@ (t (y-or-n-p (format "Decrypt (S/MIME) part? ")))) (mm-view-pkcs7 parts from)) - (goto-char (point-min)) - (insert "Content-type: text/plain\n\n") +;; (goto-char (point-min)) +;; (insert "Content-type: text/plain\n\n") (setq parts (mm-dissect-buffer t))))) ((equal subtype "signed") (unless (and (setq protocol @@ -1745,28 +1745,11 @@ (save-excursion (if func (setq parts (funcall func parts ctl)) - (mm-sec-error - 'gnus-details - (format "Unknown encrypt protocol (%s)" protocol))))))) - ;; Check the results (which are now in `parts'). - (let ((err (get-text-property 0 'sec-error (car mm-security-handle)))) - (if (or (not err) - (not (equal subtype "encrypted"))) - parts - ;; We had an error during decryption. Report what it is. - (list - (mm-make-handle - (with-current-buffer (generate-new-buffer " *mm*") - (insert "Error! Result from decryption:\n\n" - (or (get-text-property 0 'gnus-details - (car mm-security-handle)) - "") - "\n\n" - (or (get-text-property 0 'gnus-details - (car mm-security-handle)) - "")) - (current-buffer)) - '("text/plain"))))))) + (mm-set-handle-multipart-parameter + mm-security-handle 'gnus-details + (format "Unknown encrypt protocol (%s)" protocol)))))) + (t nil)) + parts)) (defun mm-multiple-handles (handles) (and (listp handles) --=-=-=--