Subject: bug#67931: closed (Re: bug#67931: [PATCH] Use S/MIME key from content for mail signing via OpenSSL)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 14 May 2024 14:47:02 +0000

Your bug report

#67931: [PATCH] Use S/MIME key from content for mail signing via OpenSSL

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
67931: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=67931
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#67931: [PATCH] Use S/MIME key from content for mail signing via OpenSSL
From: Eric Abrahamsen <[email-masked]>
To: Illia Ostapyshyn <[email-masked]>
Cc: [email-masked], [email-masked], Eli Zaretskii <[email-masked]>, [email-masked]
Date: Tue, 14 May 2024 07:45:57 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

Illia Ostapyshyn <[email-masked]> writes:

> Hi Eric,
>
> Eric Abrahamsen <[email-masked]> writes:
>
>> As we can see from the previous bug report, no one seems to understand
>> how this works! Though the punchline probably is: you're the only one
>> still using S/MIME.
>
> My workplace recommends using S/MIME and provides certificates, but I
> haven't seen it used in the wild otherwise.  I would prefer OpenPGP though.
>
>> Anyway, I'm feeling okay about this. If you think this is ready to go,
>> I'll put it in.
>
> I am satisfied with the patch and would be happy to have it installed.
> I did my copyright assignment in May 2023.

Just applied. Thanks very much.

Eric

Subject: [PATCH] Use S/MIME key from content for mail signing via OpenSSL
From: Illia Ostapyshyn <[email-masked]>
To: [email-masked]
Cc: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 20 Dec 2023 14:16:56 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

* Bug

mml-smime-openssl-sign always takes the cdar of smime-keys, resulting in
keyfile parameter of the #secure tag being ignored.  Hence, only the
first entry of smime-keys is used, regardless of the mail contents or
sender address.

* Fix

The relevant information (returned from mml-smime-openssl-sign-query) is
already in the cont alist passed to mml-smime-openssl-sign, just use
that instead.

>From 477badfc705c5dd59cfd8a577eab9eaf4a510e0f Mon Sep 17 00:00:00 2001
From: Illia Ostapyshyn <[email-masked]>
Date: Wed, 20 Dec 2023 13:57:28 +0100
Subject: [PATCH] Use S/MIME key from content for mail signing via OpenSSL

* lisp/gnus/mml-smime.el (mml-smime-openssl-sign): Use the key
passed in the cont argument instead of the first smime-keys entry.
---
 lisp/gnus/mml-smime.el | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/lisp/gnus/mml-smime.el b/lisp/gnus/mml-smime.el
index 896c95f8d3e..713b7fe5b68 100644
--- a/lisp/gnus/mml-smime.el
+++ b/lisp/gnus/mml-smime.el
@@ -130,10 +130,7 @@ mml-smime-verify-test
 	(funcall func handle ctl))))
 
 (defun mml-smime-openssl-sign (_cont)
-  (when (null smime-keys)
-    (customize-variable 'smime-keys)
-    (error "No S/MIME keys configured, use customize to add your key"))
-  (smime-sign-buffer (cdar smime-keys))
+  (smime-sign-buffer (cdr (assq 'keyfile cont)))
   (goto-char (point-min))
   (while (search-forward "\r\n" nil t)
     (replace-match "\n" t t))
-- 
2.43.0