diff options
-rw-r--r-- | mail/ChangeLog | 7 | ||||
-rw-r--r-- | mail/mail-crypto.c | 20 |
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); |