Subject: Re: bug#26587: 26.0.50; Gnus signs with false S/MIME key

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 09 Oct 2019 22:42:21 +0200

Torsten Bronger <[email-masked]> writes:

> I would like the second key to be used.  But Gnus signs the email
> with the first certificate.

If I understand the code correctly, `epg-start-sign' is run here, and
gpgsm is started with the parameters looking like 

"--detach-sign" "-u" "4A44812B553ACE6D" "-u" "4A44812B553ACEetc"

with as many "-u"s as there are in your gpgsm store that matches
whatever you've set up in that list that lists all your identities you
want to use.

Could you edebug that function to see if that's really what happens?
Because if it is, we're leaving the decision to gpgsm itself which user
ID to use, and that seems very sub-optimal.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no