From: Illia Ostapyshyn <illia@yshyn.com>
To: 67931@debbugs.gnu.org
Cc: Lars Ingebrigtsen <larsi@gnus.org>
Subject: bug#67931: [PATCH] Use S/MIME key from content for mail signing via OpenSSL
Date: Wed, 20 Dec 2023 14:16:56 +0100 [thread overview]
Message-ID: <8734vx6mk7.fsf@yshyn.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 400 bytes --]
* 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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Patch --]
[-- Type: text/x-patch, Size: 1053 bytes --]
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
next reply other threads:[~2023-12-20 13:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-20 13:16 Illia Ostapyshyn [this message]
2024-01-11 21:05 ` bug#67931: [PATCH] Use S/MIME key from content for mail signing via OpenSSL Stefan Kangas
2024-05-06 18:43 ` Illia Ostapyshyn
2024-05-06 18:46 ` Illia Ostapyshyn
2024-05-07 12:35 ` Eli Zaretskii
2024-05-07 14:21 ` Illia Ostapyshyn
2024-05-08 2:05 ` Eric Abrahamsen
2024-05-08 2:20 ` Eric Abrahamsen
2024-05-08 2:28 ` Eric Abrahamsen
2024-05-08 12:28 ` Illia Ostapyshyn
2024-05-09 23:47 ` Eric Abrahamsen
2024-05-10 11:20 ` illia
2024-05-10 20:02 ` Eric Abrahamsen
2024-05-14 12:53 ` Illia Ostapyshyn
2024-05-14 14:45 ` Eric Abrahamsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8734vx6mk7.fsf@yshyn.com \
--to=illia@yshyn.com \
--cc=67931@debbugs.gnu.org \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.