[balsa/gtk3] Fix S/MIME sending and Outlook2007 reception



commit 96974772195298fa5acd0cd2156f8f277ce5a7bd
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Fri Dec 13 20:28:30 2013 -0500

    Fix S/MIME sending and Outlook2007 reception
    
        * libbalsa/rfc3156.c (libbalsa_message_body_protection):
        x-pkcs7-mime is synonymous with pkcs7-mime;
        (libbalsa_encrypt_mime_object): use pkcs7 instead of leaking it.
        * src/balsa-message.c (libbalsa_msg_try_decrypt):
        x-pkcs7-mime is synonymous with pkcs7-mime.

 ChangeLog           |   11 +++++++++++
 libbalsa/rfc3156.c  |    4 +++-
 src/balsa-message.c |    3 ++-
 3 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 7f6c8a6..8b857f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2013-12-13  Peter Bloomfield
+
+       Fix S/MIME sending and Outlook2007 reception; bgo #720423
+       (Lilith Bryant, dark141 at gmail dot com)
+
+       * libbalsa/rfc3156.c (libbalsa_message_body_protection):
+       x-pkcs7-mime is synonymous with pkcs7-mime;
+       (libbalsa_encrypt_mime_object): use pkcs7 instead of leaking it.
+       * src/balsa-message.c (libbalsa_msg_try_decrypt):
+       x-pkcs7-mime is synonymous with pkcs7-mime.
+
 2013-09-20  Peter Bloomfield
 
        Disable GtkInfoBar workarounds
diff --git a/libbalsa/rfc3156.c b/libbalsa/rfc3156.c
index fc680b7..e7358a6 100644
--- a/libbalsa/rfc3156.c
+++ b/libbalsa/rfc3156.c
@@ -178,7 +178,8 @@ libbalsa_message_body_protection(LibBalsaMessageBody * body)
                          "octet-stream"))
            result |= LIBBALSA_PROTECT_ERROR;
        g_free(protocol);
-    } else if (body_is_type(body, "application", "pkcs7-mime")) {
+    } else if (body_is_type(body, "application", "pkcs7-mime") ||
+           body_is_type(body, "application", "x-pkcs7-mime")) {
        gchar *smime_type =
            libbalsa_message_body_get_parameter(body, "smime-type");
 
@@ -282,6 +283,7 @@ libbalsa_encrypt_mime_object(GMimeObject ** content, GList * rfc822_for,
     else {
        GMimePart *pkcs7 =
            g_mime_part_new_with_type("application", "pkcs7-mime");
+       encrypted_obj = GMIME_OBJECT(pkcs7);
 
        result = g_mime_application_pkcs7_encrypt(pkcs7, *content, recipients, always_trust, parent, error);
     }
diff --git a/src/balsa-message.c b/src/balsa-message.c
index a5ae949..253eaeb 100644
--- a/src/balsa-message.c
+++ b/src/balsa-message.c
@@ -2764,7 +2764,8 @@ libbalsa_msg_try_decrypt(LibBalsaMessage * message, LibBalsaMessageBody * body,
     this_body = body;
     mime_type = libbalsa_message_body_get_mime_type(this_body);
     while (!g_ascii_strcasecmp(mime_type, "multipart/encrypted") ||
-          !g_ascii_strcasecmp(mime_type, "application/pkcs7-mime")) {
+          !g_ascii_strcasecmp(mime_type, "application/pkcs7-mime") ||
+          !g_ascii_strcasecmp(mime_type, "application/x-pkcs7-mime")) {
        gint encrres;
 
        /* FIXME: not checking for body_ref > 1 (or > 2 when re-checking, which


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