From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#40118: 27.0.90; Signing emails with gpg Date: Thu, 16 Apr 2020 12:38:13 +0200 Message-ID: References: <87tv2lhg2p.fsf@skimble.plus.com> <87d08a9vb9.fsf@gmail.com> <83mu7cg0k8.fsf@gnu.org> <83pnc7enyx.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="3677"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, stepnem@gmail.com, 40118@debbugs.gnu.org, boudiccas@skimble.plus.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 16 12:39:14 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 1jP1vN-0000sD-SO for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 Apr 2020 12:39:13 +0200 Original-Received: from localhost ([::1]:60502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jP1vM-0001D4-Oc for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 Apr 2020 06:39:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37200) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jP1vE-0001Cf-30 for bug-gnu-emacs@gnu.org; Thu, 16 Apr 2020 06:39:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jP1vC-0008PD-PE for bug-gnu-emacs@gnu.org; Thu, 16 Apr 2020 06:39:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54283) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jP1vC-0008P1-Jt for bug-gnu-emacs@gnu.org; Thu, 16 Apr 2020 06:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jP1vC-0006Ba-GS for bug-gnu-emacs@gnu.org; Thu, 16 Apr 2020 06:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Apr 2020 10:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40118 X-GNU-PR-Package: emacs Original-Received: via spool by 40118-submit@debbugs.gnu.org id=B40118.158703350423708 (code B ref 40118); Thu, 16 Apr 2020 10:39:02 +0000 Original-Received: (at 40118) by debbugs.gnu.org; 16 Apr 2020 10:38:24 +0000 Original-Received: from localhost ([127.0.0.1]:37596 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jP1ua-0006AJ-Ds for submit@debbugs.gnu.org; Thu, 16 Apr 2020 06:38:24 -0400 Original-Received: from mail-wr1-f51.google.com ([209.85.221.51]:34245) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jP1uX-00069z-RG for 40118@debbugs.gnu.org; Thu, 16 Apr 2020 06:38:22 -0400 Original-Received: by mail-wr1-f51.google.com with SMTP id d27so4274437wra.1 for <40118@debbugs.gnu.org>; Thu, 16 Apr 2020 03:38:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=F6ai0LoA2WtAPAHfUAE44akf9XvreLL+QkHf8bua2q8=; b=cA2Ik3DxSOZc6JJkEf+OmeS6bFyIXdjZ4HahtUO2Df4cBPtfj13Egoz5mpnpoL9ksJ RW+bPjXs8uVHprROtYVvgtVFEUOrNWDDjtp7LJcyoPyKaabtRbCXUbAwgB3ZQ5S+IpLE uPq2/aDBqHHnuIaj0g1GvXjq/IOfGs0/ysPErgZGjQLH9x+dtVeLxlFzuzuS61jhlmez wTDFpByGfuDyKSIl1+qeGezM9Mb8J0kt2Qp4R+KjQGLNlq9ZH4SUtgrV9xUfBdaue2Iv OZL+Afh0D3Wcfpz7TNOHMYSVn8oJl332QzYBHIN3p/Y+3FnsU4N3CS3iIzI9LLzv9bAN PBsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=F6ai0LoA2WtAPAHfUAE44akf9XvreLL+QkHf8bua2q8=; b=sETZXGv1BXHYRK7fHP2Ekmphyy/RqgpOvCU2kMRY6hqkeC8+ZryNzjKB9GUvdjbdf5 DIhLnHp2jK4zYRHw8CVTBI8Mmb2PYOZTWykO2wLS8S0a+gZ6LPEDOZsFNkkgdAC/2Uah bI2dQgBuY7j+M9828SNV+Nc+XemNbX75MoDj6ocg44Mtg+5Sg2brZXbHeDRc4jnVZhSx xB62qKOBv5rEFauSQjWNGjjWEznPiPg5QQM7WvMZZol5JxbGhgHl7A4ib6ynXCwgpb+i mFzN+oI3ciAdhzdOJKkBolriQbtEKK7+DTzR9XETNVb+qqybz09smHc+lRmi4lUgYnOy mcMw== X-Gm-Message-State: AGi0PubXCQGXtQx8zQUJdaHe1KlWU06z7p7CuzQcjUBFtMRV6uACPffy 1NvBIe3g5DkxRGQhQjvWOCU= X-Google-Smtp-Source: APiQypJAzS1P93Hr/r65k4Zu0rhzPekwx2qN7Ey2vRUfP6GC9WqnLa4oVMm8wZq4/XEgIiDS7sEpeg== X-Received: by 2002:adf:e403:: with SMTP id g3mr33510747wrm.121.1587033495788; Thu, 16 Apr 2020 03:38:15 -0700 (PDT) Original-Received: from rpluim-mac ([2a01:e34:ecfc:a860:384e:c682:f3e3:6663]) by smtp.gmail.com with ESMTPSA id n4sm2998527wmi.20.2020.04.16.03.38.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Apr 2020 03:38:15 -0700 (PDT) In-Reply-To: <83pnc7enyx.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 16 Apr 2020 13:15:02 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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:178443 Archived-At: >>>>> On Thu, 16 Apr 2020 13:15:02 +0300, Eli Zaretskii said: >> From: Robert Pluim >> Cc: stepnem@gmail.com, 40118@debbugs.gnu.org, boudiccas@skimble.pl= us.com >> Date: Thu, 16 Apr 2020 11:44:51 +0200 >>=20 >> In emacs-26, mml-secure-epg-sign could specify that a message should >> be signed with a key based on the sender=CA=BCs email address. If the >> variable governing that was nil, it was left to gpg to figure out the >> key to use. Normally that means gpg uses its default key. >>=20 >> In emacs-27, mml-secure-epg-sign now checks explicitly whether that >> variable is nil, and refuses to continue. Eli> Why was this change in behavior made in Emacs 27? I don=CA=BCt know. Lars? (and why only for signing and not encrypting?) commit 9c81149ae9165b0f017d60d141221b340879baef Author: Lars Ingebrigtsen Date: Wed Oct 9 21:55:41 2019 +0200 Make mml-secure-epg-sign bug out if we can't find an identity * lisp/gnus/mml-sec.el (mml-secure-epg-sign): Bug out if we couldn't find anything to sign with instead of silently pretending to sign. >> With an error message that in at least 50% of the cases points the >> user to the wrong user option. This is a regression from emacs-26. >>=20 >> Fixing the error message is easy. I=CA=BCm proposing that by default= the >> sender=CA=BCs email address is used to determine the key to use, sin= ce >> that=CA=BCs what almost everyone will want. People who don=CA=BCt wa= nt that can >> control the behaviour by either adding keys to >> 'mml-secure-openpgp-signers' or by setting 'mm-sign-option' to >> 'guided. Eli> I'd prefer to have a behavior that didn't require any changes, if Eli> possible. Thus the above question. If having a compatible behavi= or Eli> is impractical, then let's discuss what would the lesser evil. setting mml-secure-smime-sign-with-sender and mml-secure-openpgp-sign-with-sender to t gets us back to the previous behaviour in the default case. People that didn=CA=BCt want that behaviour would already have set mml-secure-openpgp-signers and/or mm-sign-option. Actually, setting those two options to t would result in a behaviour change for people who use mml-secure-{openpgp,smime}-signers to select a signing key that=CA=BCs not the same as the one for the sender. I think those people fall in the 'know what they=CA=BCre doing' category, and they can set them back to nil. I think the absolute minimum we should do for emacs-27 is this: diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el index 740e1d2b72..395c1e8253 100644 =2D-- a/lisp/gnus/mml-sec.el +++ b/lisp/gnus/mml-sec.el @@ -946,12 +946,14 @@ mml-secure-epg-sign signature micalg) (unless signers (let ((maybe-msg =2D (if mml-secure-smime-sign-with-sender + (if (or mml-secure-smime-sign-with-sender + mml-secure-openpgp-sign-with-sender) "." =2D "; try setting `mml-secure-smime-sign-with-sender'."))) =2D ;; If `mml-secure-smime-sign-with-sender' is already non-nil =2D ;; then there's no point advising the user to examine it. If =2D ;; there are any other variables worth examining, please + "; try setting `mml-secure-smime-sign-with-sender' or 'mml-= secure-openpgp-sign-with-sender'."))) + ;; If `mml-secure-smime-sign-with-sender' or + ;; `mml-secure-openpgp-sign-with-sender' are already non-nil + ;; then there's no point advising the user to examine them. + ;; If there are any other variables worth examining, please ;; improve this error message by having it mention them. (error "Couldn't find any signer names%s" maybe-msg))) (when (eq 'OpenPGP protocol)