aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-10-02 02:34:10 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-10-02 02:34:10 +0800
commit4f785ed4ada9d90c5b1cc12f78a6b69694b1c1a5 (patch)
tree586cb69a3de6e316bf1c857b697928925c6205bf /mail
parent7bbdb47dd5af50c7690411ee3111855015f935c2 (diff)
downloadgsoc2013-evolution-4f785ed4ada9d90c5b1cc12f78a6b69694b1c1a5.tar
gsoc2013-evolution-4f785ed4ada9d90c5b1cc12f78a6b69694b1c1a5.tar.gz
gsoc2013-evolution-4f785ed4ada9d90c5b1cc12f78a6b69694b1c1a5.tar.bz2
gsoc2013-evolution-4f785ed4ada9d90c5b1cc12f78a6b69694b1c1a5.tar.lz
gsoc2013-evolution-4f785ed4ada9d90c5b1cc12f78a6b69694b1c1a5.tar.xz
gsoc2013-evolution-4f785ed4ada9d90c5b1cc12f78a6b69694b1c1a5.tar.zst
gsoc2013-evolution-4f785ed4ada9d90c5b1cc12f78a6b69694b1c1a5.zip
Handle a multipart/encrypted part. Fixes bug #31547.
2002-10-01 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (mail_get_message_body): Handle a multipart/encrypted part. Fixes bug #31547. svn path=/trunk/; revision=18284
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog3
-rw-r--r--mail/mail-format.c12
2 files changed, 14 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index c9e8568717..6de7d5b813 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,8 @@
2002-10-01 Jeffrey Stedfast <fejj@ximian.com>
+ * mail-format.c (mail_get_message_body): Handle a
+ multipart/encrypted part. Fixes bug #31547.
+
* upgrade-mailer.c: Shut up some compiler warnings.
* importers/evolution-mbox-importer.c (process_item_fn): Use the
diff --git a/mail/mail-format.c b/mail/mail-format.c
index 12cd41dc90..dc63788b66 100644
--- a/mail/mail-format.c
+++ b/mail/mail-format.c
@@ -2324,6 +2324,7 @@ mail_get_message_body (CamelDataWrapper *data, gboolean want_plain, gboolean cit
{
char *subtext, *old, *div, *text = NULL;
CamelContentType *mime_type;
+ CamelCipherContext *cipher;
GByteArray *bytes = NULL;
CamelMimePart *subpart;
CamelMultipart *mp;
@@ -2373,7 +2374,16 @@ mail_get_message_body (CamelDataWrapper *data, gboolean want_plain, gboolean cit
mp = CAMEL_MULTIPART (data);
- if (header_content_type_is (mime_type, "multipart", "alternative")) {
+ if (CAMEL_IS_MULTIPART_ENCRYPTED (mp)) {
+ cipher = camel_gpg_context_new (session, mail_config_get_pgp_path ());
+ subpart = camel_multipart_encrypted_decrypt (CAMEL_MULTIPART_ENCRYPTED (mp),
+ cipher, NULL);
+ if (!subpart)
+ return NULL;
+
+ data = camel_medium_get_content_object (CAMEL_MEDIUM (subpart));
+ return mail_get_message_body (data, want_plain, cite);
+ } else if (header_content_type_is (mime_type, "multipart", "alternative")) {
/* Pick our favorite alternative and reply to it. */
subpart = find_preferred_alternative (mp, want_plain);