[Top][All Lists]

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

bug#6654: 23.2; mml-secure-message-encrypt-smime can't handle multiple r

From: Daiki Ueno
Subject: bug#6654: 23.2; mml-secure-message-encrypt-smime can't handle multiple recipients
Date: Tue, 20 Jul 2010 11:08:51 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)


Jay Berkenbilt <address@hidden> 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.

=== 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 @@
                                 ,(if keyfile "keyfile")
-                                ,(if certfile "certfile")
-                                ,certfile
+                                ,@(apply #'append
+                                         (mapcar (lambda (certfile)
+                                                   (list "certfile" certfile))
+                                                 certfiles))
                                 ,(if recipients "recipients")
                                 ,(if sender "sender")

Daiki Ueno

reply via email to

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