emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#67931: closed ([PATCH] Use S/MIME key from content for mail signing


From: GNU bug Tracking System
Subject: bug#67931: closed ([PATCH] Use S/MIME key from content for mail signing via OpenSSL)
Date: Tue, 14 May 2024 14:47:02 +0000

Your message dated Tue, 14 May 2024 07:45:57 -0700
with message-id <87le4c8na2.fsf@ericabrahamsen.net>
and subject line Re: bug#67931: [PATCH] Use S/MIME key from content for mail 
signing via OpenSSL
has caused the debbugs.gnu.org bug report #67931,
regarding [PATCH] Use S/MIME key from content for mail signing via OpenSSL
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
67931: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=67931
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] Use S/MIME key from content for mail signing via OpenSSL Date: Wed, 20 Dec 2023 14:16:56 +0100 User-agent: Gnus/5.13 (Gnus v5.13)
* 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 <illia@yshyn.com>
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


--- End Message ---
--- Begin Message --- Subject: Re: bug#67931: [PATCH] Use S/MIME key from content for mail signing via OpenSSL Date: Tue, 14 May 2024 07:45:57 -0700 User-agent: Gnus/5.13 (Gnus v5.13)
Illia Ostapyshyn <illia@yshyn.com> writes:

> Hi Eric,
>
> Eric Abrahamsen <eric@ericabrahamsen.net> 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


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]