all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Daiki Ueno <ueno@unixuser.org>
To: Jay Berkenbilt <ejb@ql.org>
Cc: 6654@debbugs.gnu.org
Subject: bug#6654: 23.2; mml-secure-message-encrypt-smime can't handle multiple recipients
Date: Tue, 20 Jul 2010 11:08:51 +0900	[thread overview]
Message-ID: <m37hkq3nws.fsf-ueno@unixuser.org> (raw)
In-Reply-To: <20100716142731.0632953242.qww314159@motoko.argon.local> (Jay Berkenbilt's message of "Fri, 16 Jul 2010 14:27:31 -0400")

[-- Attachment #1: Type: text/plain, Size: 771 bytes --]

Hi,

Jay Berkenbilt <ejb@ql.org> writes:

> When attempting to send an encrypted message to multiple recipients,
> mml-secure-message-encrypt-smime creates a "secure" mml tag contains a
> separate certfile attribute for each recipient.  For example (with !
> below replaced by #):
>
> <!secure method=smime mode=signencrypt keyfile="~/certs/key.pem" certfile="~/certs/c1.pem" certfile="~/certs/c2.pem">
[...]
> you can see that certfile is set by calling (assq 'certfile taginfo),
> which loses all but the first certfile.  This causes it to be mapped
> into this:
>
> <!part sign=smime encrypt=smime keyfile="~/certs/key.pem" certfile="~/certs/c1.pem">

Thanks for the analysis.  Could you try the attached patch?  If ok, I'll
apply it to the trunk and close this bug.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: mml-secure-smime-multiple-certfile.diff --]
[-- Type: text/x-patch, Size: 933 bytes --]

=== modified file 'lisp/gnus/mml.el'
--- lisp/gnus/mml.el	2010-05-06 04:15:34 +0000
+++ lisp/gnus/mml.el	2010-07-20 01:56:14 +0000
@@ -228,7 +228,10 @@
 	(let* (secure-mode
 	       (taginfo (mml-read-tag))
 	       (keyfile (cdr (assq 'keyfile taginfo)))
-	       (certfile (cdr (assq 'certfile taginfo)))
+	       (certfiles (delq nil (mapcar (lambda (tag)
+					      (if (eq (car-safe tag) 'certfile)
+						  (cdr tag)))
+					    taginfo)))
 	       (recipients (cdr (assq 'recipients taginfo)))
 	       (sender (cdr (assq 'sender taginfo)))
 	       (location (cdr (assq 'tag-location taginfo)))
@@ -254,8 +257,10 @@
 				 ,@tags
 				 ,(if keyfile "keyfile")
 				 ,keyfile
-				 ,(if certfile "certfile")
-				 ,certfile
+				 ,@(apply #'append
+					  (mapcar (lambda (certfile)
+						    (list "certfile" certfile))
+						  certfiles))
 				 ,(if recipients "recipients")
 				 ,recipients
 				 ,(if sender "sender")


[-- Attachment #3: Type: text/plain, Size: 25 bytes --]


Regards,
-- 
Daiki Ueno

  reply	other threads:[~2010-07-20  2:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-16 18:27 bug#6654: 23.2; mml-secure-message-encrypt-smime can't handle multiple recipients Jay Berkenbilt
2010-07-20  2:08 ` Daiki Ueno [this message]
2010-07-20 16:58   ` Jay Berkenbilt
2010-07-21  6:04     ` Daiki Ueno

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=m37hkq3nws.fsf-ueno@unixuser.org \
    --to=ueno@unixuser.org \
    --cc=6654@debbugs.gnu.org \
    --cc=ejb@ql.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.