aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-03-06 01:47:01 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-03-06 01:47:01 +0800
commit6daf98ee0a7c0de9de5a713b2a529b811e945d06 (patch)
treef483791ffe73d3d54d0e77ef441d2ddb2612f69f
parent5c8f0e65f610a0343a895ebafefee8ff796ae7c7 (diff)
downloadgsoc2013-evolution-6daf98ee0a7c0de9de5a713b2a529b811e945d06.tar
gsoc2013-evolution-6daf98ee0a7c0de9de5a713b2a529b811e945d06.tar.gz
gsoc2013-evolution-6daf98ee0a7c0de9de5a713b2a529b811e945d06.tar.bz2
gsoc2013-evolution-6daf98ee0a7c0de9de5a713b2a529b811e945d06.tar.lz
gsoc2013-evolution-6daf98ee0a7c0de9de5a713b2a529b811e945d06.tar.xz
gsoc2013-evolution-6daf98ee0a7c0de9de5a713b2a529b811e945d06.tar.zst
gsoc2013-evolution-6daf98ee0a7c0de9de5a713b2a529b811e945d06.zip
Correcty set the mime type for the multipart. Hmmm, still doesn't wrap
2001-03-05 Jeffrey Stedfast <fejj@ximian.com> * mail-crypto.c (pgp_mime_part_sign): Correcty set the mime type for the multipart. Hmmm, still doesn't wrap correctly. NotZed? Ideas? (pgp_mime_part_encrypt): Here too. svn path=/trunk/; revision=8559
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/mail-crypto.c20
2 files changed, 19 insertions, 8 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index ea7844e966..0f6aa37185 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,10 @@
+2001-03-05 Jeffrey Stedfast <fejj@ximian.com>
+
+ * mail-crypto.c (pgp_mime_part_sign): Correcty set the mime type
+ for the multipart. Hmmm, still doesn't wrap correctly. NotZed?
+ Ideas?
+ (pgp_mime_part_encrypt): Here too.
+
2001-03-03 Not Zed <NotZed@Ximian.com>
* mail-tools.c: Remove very old camel lock stuff.
diff --git a/mail/mail-crypto.c b/mail/mail-crypto.c
index efef0f09e1..fcba02c0a4 100644
--- a/mail/mail-crypto.c
+++ b/mail/mail-crypto.c
@@ -207,9 +207,6 @@ pgp_mime_part_sign (CamelMimePart **mime_part, const gchar *userid, PgpHashType
g_free (signature);
/* construct the container multipart/signed */
- multipart = camel_multipart_new ();
- camel_data_wrapper_set_mime_type (CAMEL_DATA_WRAPPER (multipart),
- "multipart/signed");
switch (hash) {
case PGP_HASH_TYPE_MD5:
hash_type = "pgp-md5";
@@ -221,9 +218,14 @@ pgp_mime_part_sign (CamelMimePart **mime_part, const gchar *userid, PgpHashType
g_assert_not_reached ();
}
- mime_type = camel_data_wrapper_get_mime_type_field (CAMEL_DATA_WRAPPER (multipart));
+ multipart = camel_multipart_new ();
+
+ mime_type = header_content_type_new ("multipart", "signed");
header_content_type_set_param (mime_type, "micalg", hash_type);
header_content_type_set_param (mime_type, "protocol", "application/pgp-signature");
+ camel_data_wrapper_set_mime_type_field (CAMEL_DATA_WRAPPER (multipart), mime_type);
+ header_content_type_unref (mime_type);
+
camel_multipart_set_boundary (multipart, NULL);
/* add the parts to the multipart */
@@ -364,11 +366,13 @@ pgp_mime_part_encrypt (CamelMimePart **mime_part, const GPtrArray *recipients, C
/* construct the container multipart/signed */
multipart = camel_multipart_new ();
- camel_data_wrapper_set_mime_type (CAMEL_DATA_WRAPPER (multipart),
- "multipart/encrypted");
- camel_multipart_set_boundary (multipart, NULL);
- mime_type = camel_data_wrapper_get_mime_type_field (CAMEL_DATA_WRAPPER (multipart));
+
+ mime_type = header_content_type_new ("multipart", "encrypted");
header_content_type_set_param (mime_type, "protocol", "application/pgp-encrypted");
+ camel_data_wrapper_set_mime_type_field (CAMEL_DATA_WRAPPER (multipart), mime_type);
+ header_content_type_unref (mime_type);
+
+ camel_multipart_set_boundary (multipart, NULL);
/* add the parts to the multipart */
camel_multipart_add_part (multipart, version_part);