** See bug #271894.
authorNot Zed <NotZed@Ximian.com>
Fri, 19 Aug 2005 05:36:33 +0000 (05:36 +0000)
committerMichael Zucci <zucchi@src.gnome.org>
Fri, 19 Aug 2005 05:36:33 +0000 (05:36 +0000)
2005-08-18  Not Zed  <NotZed@Ximian.com>

        ** See bug #271894.

        * camel-gpg-context.c (gpg_decrypt): use the content part's
        mime-type to determine options.

camel/ChangeLog
camel/camel-gpg-context.c

index 93f4375..e2e1821 100644 (file)
@@ -1,3 +1,10 @@
+2005-08-18  Not Zed  <NotZed@Ximian.com>
+
+       ** See bug #271894.
+
+       * camel-gpg-context.c (gpg_decrypt): use the content part's
+       mime-type to determine options.
+
 2005-08-17  Tor Lillqvist  <tml@novell.com>
 
        * camel-operation.c (stamp): Use g_get_current_time() instead of
index d9455c6..d6f8dd4 100644 (file)
@@ -1628,18 +1628,17 @@ gpg_decrypt(CamelCipherContext *context, CamelMimePart *ipart, CamelMimePart *op
        CamelContentType *ct;
        int rv;
        
-       ct = camel_mime_part_get_content_type(ipart);
+       content = camel_medium_get_content_object((CamelMedium *)ipart);
+       ct = camel_mime_part_get_content_type(content);
        /* Encrypted part (using our fake mime type) or PGP/Mime multipart */
-       if (camel_content_type_is(ct, "multipart", "encrypted")) {
-       
+       if (camel_content_type_is(ct, "multipart", "encrypted")) {      
                mp = (CamelMultipart *) camel_medium_get_content_object ((CamelMedium *) ipart);
                if (!(encrypted = camel_multipart_get_part (mp, CAMEL_MULTIPART_ENCRYPTED_CONTENT))) {
                        camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, _("Failed to decrypt MIME part: protocol error"));
                        return NULL;
                }
-               
-               content = camel_medium_get_content_object ((CamelMedium *) encrypted);
 
+               content = camel_medium_get_content_object ((CamelMedium *) encrypted);
        } else if (camel_content_type_is(ct, "application", "x-inlinepgp-encrypted")) {
                content = camel_medium_get_content_object ((CamelMedium *) ipart);