From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/44567 Path: main.gmane.org!not-for-mail From: Dmitry Bely Newsgroups: gmane.emacs.gnus.general Subject: Re: mml1991.el patch (was gpg.el) Date: Wed, 01 May 2002 19:33:17 +0400 Organization: DB @ somewhere Sender: owner-ding@hpc.uh.edu Message-ID: References: <87wuuupjhi.fsf@deneb.enyo.de> <7kmqjt4d.fsf@mail.ru> <87r8kw17dw.fsf@deneb.enyo.de> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1020267277 32415 127.0.0.1 (1 May 2002 15:34:37 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 1 May 2002 15:34:37 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 172w7p-0008Qi-00 for ; Wed, 01 May 2002 17:34:37 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 172w6y-00016B-00; Wed, 01 May 2002 10:33:44 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 01 May 2002 10:33:58 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id KAA08086 for ; Wed, 1 May 2002 10:33:44 -0500 (CDT) Original-Received: (qmail 6819 invoked by alias); 1 May 2002 15:33:20 -0000 Original-Received: (qmail 6814 invoked from network); 1 May 2002 15:33:20 -0000 Original-Received: from quimby.gnus.org (80.91.224.244) by gnus.org with SMTP; 1 May 2002 15:33:20 -0000 Original-Received: from news by quimby.gnus.org with local (Exim 3.12 #1 (Debian)) id 172wBP-0006kT-00 for ; Wed, 01 May 2002 17:38:19 +0200 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 47 Original-NNTP-Posting-Host: d063.p3.col.ru Original-X-Trace: quimby.gnus.org 1020267499 25944 195.210.132.63 (1 May 2002 15:38:19 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 1 May 2002 15:38:19 GMT X-Comment-To: Florian Weimer User-Agent: Gnus/5.090006 (Oort Gnus v0.06) XEmacs/21.4 (Civil Service (Windows), i586-pc-win32) Cancel-Lock: sha1:JMM/VUijHd/cgKw+XXcX4U9Jaa0= Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:44567 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:44567 Florian Weimer writes: >> OK, that's not the gpg.el bug. The problem is that >> >> (1) (mm-body-encoding) does not allow 8bit encodings for PGP-signed >> messages and returns base64 for some code pages (e.g. for Russian >> koi8r) > > For clearsigned messages (that's the stuff mml1991.el is for), or for > OpenPGP/MIME-signed messages? It should be necessary only in the > latter case. Of course, for clearsigned messages, i.e. messages with traditional PGP signature (function "mml-secure-message-sign-pgp"). You may check this yourself -- it requires quoted-printable even for us-ascii if message will be later PGP-signed. PGP/MIME is not broken and already works as expected. >> (2) (mml1991-gpg-sign) always assumes that it gets qp-encoded text, so it >> fails if base64-encoded one is supplied. >> >> Here is the patch that fixes this issue (I am neither the very experienced >> Lisp programmer nor Gnus hacker, so if you feel that I did something the >> wrong, please correct me) > > IMHO, your change is wrong from an architectural point of > view. mml1991.el signatures should be applied *after* we have > generate the octet stream which is to be sent, but *before* > Content-Transfer-Encoding is applied. Exactly. But if you look into the sources, you will see that (mml1991-gpg-sign) gets the message with Content-Transfer-Encoding already applied. So (mml1991-gpg-sign) 1) unpacks the message, then 2) signs it with PGP/GPG, then 3) packs it again. Yes, one pack/unpack sequence is redundant (it would be better if (mml1991-gpg-sign) gets the original octet stream), but Gnus is written this way, and I cannot easily change it. My patch only corrects the wrong assumption, made in (mml1991-gpg-sign), that its input stream is always quoted-printable encoded. > But I'll check with OpenPGP WG to be sure that this is the right > approach to clearsigned messages and MIME. It works for me. Now I can sign and verify PGP messages without a problem. Hope to hear from you soon, Dmitry