aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-pgp-mime.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-10-23 01:44:50 +0800
committerDan Winship <danw@src.gnome.org>2001-10-23 01:44:50 +0800
commit824967d8435771efc1d792b05a95483d7082755e (patch)
tree914eeacfe5e5fc2e28abff1943ec7505d49519b4 /camel/camel-pgp-mime.c
parent141f12fe3e0aafa6050d18534513d422fb00f9d4 (diff)
downloadgsoc2013-evolution-824967d8435771efc1d792b05a95483d7082755e.tar
gsoc2013-evolution-824967d8435771efc1d792b05a95483d7082755e.tar.gz
gsoc2013-evolution-824967d8435771efc1d792b05a95483d7082755e.tar.bz2
gsoc2013-evolution-824967d8435771efc1d792b05a95483d7082755e.tar.lz
gsoc2013-evolution-824967d8435771efc1d792b05a95483d7082755e.tar.xz
gsoc2013-evolution-824967d8435771efc1d792b05a95483d7082755e.tar.zst
gsoc2013-evolution-824967d8435771efc1d792b05a95483d7082755e.zip
Add a hack: if the multipart/signed part has a "x-inline-pgp-hack"
* camel-pgp-mime.c (camel_pgp_mime_part_verify): Add a hack: if the multipart/signed part has a "x-inline-pgp-hack" parameter in its Content-Type, don't pass the MIME headers as part of the data to be verified. svn path=/trunk/; revision=13881
Diffstat (limited to 'camel/camel-pgp-mime.c')
-rw-r--r--camel/camel-pgp-mime.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/camel/camel-pgp-mime.c b/camel/camel-pgp-mime.c
index fb17256528..37b7cb1b58 100644
--- a/camel/camel-pgp-mime.c
+++ b/camel/camel-pgp-mime.c
@@ -351,6 +351,7 @@ camel_pgp_mime_part_verify (CamelPgpContext *context, CamelMimePart *mime_part,
CamelMimeFilter *crlf_filter, *from_filter;
CamelStream *stream, *sigstream;
CamelCipherValidity *valid;
+ CamelContentType *type;
g_return_val_if_fail (mime_part != NULL, NULL);
g_return_val_if_fail (CAMEL_IS_MIME_PART (mime_part), NULL);
@@ -372,7 +373,13 @@ camel_pgp_mime_part_verify (CamelPgpContext *context, CamelMimePart *mime_part,
camel_object_unref (CAMEL_OBJECT (crlf_filter));
camel_stream_filter_add (filtered_stream, CAMEL_MIME_FILTER (from_filter));
camel_object_unref (CAMEL_OBJECT (from_filter));
- camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (part), CAMEL_STREAM (filtered_stream));
+
+ type = camel_mime_part_get_content_type (mime_part);
+ if (header_content_type_param (type, "x-inline-pgp-hack"))
+ wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (part));
+ else
+ wrapper = CAMEL_DATA_WRAPPER (part);
+ camel_data_wrapper_write_to_stream (wrapper, CAMEL_STREAM (filtered_stream));
camel_object_unref (CAMEL_OBJECT (filtered_stream));
camel_stream_reset (stream);