From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/68341 Path: news.gmane.org!not-for-mail From: Daiki Ueno Newsgroups: gmane.emacs.gnus.general Subject: Re: [PATCH] mml2015-epg-sign does not use from header. Date: Mon, 02 Mar 2009 02:13:12 +0900 Message-ID: <8fbade90-fdaa-4dc9-8661-16fedbd91c9a@broken.deisui.org> References: <87d4e7skx6.fsf@hati.baby-gnu.org> <87wscf3al8.fsf@hati.baby-gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1235927655 18922 80.91.229.12 (1 Mar 2009 17:14:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 1 Mar 2009 17:14:15 +0000 (UTC) Cc: ding@gnus.org To: Daniel Dehennin Original-X-From: ding-owner+M16780@lists.math.uh.edu Sun Mar 01 18:15:31 2009 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1LdpGE-0000Pq-J0 for ding-account@gmane.org; Sun, 01 Mar 2009 18:15:30 +0100 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 1LdpED-0000hL-Fs; Sun, 01 Mar 2009 11:13:25 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1LdpEB-0000h0-Dp for ding@lists.math.uh.edu; Sun, 01 Mar 2009 11:13:23 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1LdpE8-0000E1-D0 for ding@lists.math.uh.edu; Sun, 01 Mar 2009 11:13:23 -0600 Original-Received: from ti-out-0910.google.com ([209.85.142.189]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1LdpET-00009T-00 for ; Sun, 01 Mar 2009 18:13:41 +0100 Original-Received: by ti-out-0910.google.com with SMTP id 28so2590435tif.1 for ; Sun, 01 Mar 2009 09:13:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :references:date:in-reply-to:message-id:user-agent:mime-version :content-type; bh=kdPS7hnK5oPmwT+ZLHdVfbHwHWO3dLWqBz/rw9VHELM=; b=XeomBYAgH4Nvl0+x9vAxgxmZayzwVnCHTnA99TOioNTLrO0fiqyc7fwzReZi3GeXoq +5QN8ib6ivqdVkBR6TT4A3W/s/UFk/cRRvnI/TiWrDf9y/CmCFSsflWLvjfydL9LI5O1 Qi9ZobDnfeqdDq83Gi2Gwbu8x8dDSf2BnYk0Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=Gy83FYE/eA1K/qPuzGPtDLMZmcYxCAAv5Yc85aXNfStrIKubkj9+ryXy+rGCt2qq77 6vLgQ3qrxkU38pvRqKbYD7rM1wXZXICBb1iZBYzcpq4jZRf8y5+/0cAGb+wdse+M9BEz vkQKs98l6xsuYAd2wtL6bjnTZd+K5ElpiJ1lo= Original-Received: by 10.110.84.3 with SMTP id h3mr7386448tib.5.1235927595841; Sun, 01 Mar 2009 09:13:15 -0800 (PST) Original-Received: from chilled (221x255x76x222.ap221.ftth.ucom.ne.jp [221.255.76.222]) by mx.google.com with ESMTPS id a14sm9438240tia.27.2009.03.01.09.13.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 01 Mar 2009 09:13:14 -0800 (PST) In-Reply-To: <87wscf3al8.fsf@hati.baby-gnu.org> (Daniel Dehennin's message of "Wed, 28 Jan 2009 12:59:31 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.90 (gnu/linux) X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:68341 Archived-At: >>>>> In <87wscf3al8.fsf@hati.baby-gnu.org> >>>>> Daniel Dehennin wrote: > * lisp/mml2015.el (mml2015-epg-sign): New variable 'sender' > is (message-options-get 'message-sender). Use it in place of > mml2015-signers. Sorry for late response, and thanks for splitting your patch. > --- lisp/mml2015.el 2009-01-22 07:02:15 +0000 > +++ lisp/mml2015.el 2009-01-27 18:44:28 +0000 > @@ -1182,6 +1182,7 @@ > (let* ((inhibit-redisplay t) > (context (epg-make-context)) > (boundary (mml-compute-boundary cont)) > + (sender (message-options-get 'message-sender)) > signer-key > (signers > (or (message-options-get 'mml2015-epg-signers) > @@ -1191,8 +1192,8 @@ > (epa-select-keys context "\ > Select keys for signing. > If no one is selected, default secret key is used. " > - mml2015-signers t) > - (if mml2015-signers > + sender t) > + (if sender > (delq nil > (mapcar > (lambda (signer) > @@ -1206,7 +1207,7 @@ > signer))) > (error "No secret key for %s" signer)) > signer-key) > - mml2015-signers))))))) > + (list sender)))))))) > signature micalg) > (epg-context-set-armor context t) > (epg-context-set-textmode context t) Unfortunatelly, this patch looks unacceptable since it breaks the compatibility of the user setting. Although I agree with that the typical user would expect his From: line be used as the keygrip of the signing key, existing users (including I) may have a setting of mml2015-signers. Why not adjust mml2015-signers to include the From: address instead of entirely overwriting it? Like this: (defun mml2015-epg-uniquify-keys (keys) (let (key-id key-ids) (delq nil (mapcar (lambda (key) (setq key-id (car (epg-key-sub-key-list key))) (unless (member key-id key-ids) (setq key-ids (cons key-id key-ids)) key)) keys)))) In mml2015-epg-sign: - mml2015-signers))))))) + (append mml2015-signers (list sender))))))))) ... + (setq signers (mml2015-epg-uniquify-keys signers)) Regards, -- Daiki Ueno