--- 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 ---