diff options
-rw-r--r-- | camel/ChangeLog | 6 | ||||
-rw-r--r-- | camel/camel-pgp-mime.c | 46 |
2 files changed, 7 insertions, 45 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 0e4da1dc13..0b4da1ddd1 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,9 @@ +2001-12-14 Jeffrey Stedfast <fejj@ximian.com> + + * camel-pgp-mime.c (camel_pgp_mime_part_verify): Removed + x-inline-pgp-hack kludge because it doesn't work. + (camel_pgp_mime_part_decrypt): Same. + 2001-12-13 Chris Toshok <toshok@ximian.com> * camel-data-cache.c: include stdlib.h (for alloca on freebsd) and diff --git a/camel/camel-pgp-mime.c b/camel/camel-pgp-mime.c index fe5b230974..4afa137aec 100644 --- a/camel/camel-pgp-mime.c +++ b/camel/camel-pgp-mime.c @@ -376,30 +376,7 @@ camel_pgp_mime_part_verify (CamelPgpContext *context, CamelMimePart *mime_part, camel_stream_filter_add (filtered_stream, CAMEL_MIME_FILTER (from_filter)); camel_object_unref (CAMEL_OBJECT (from_filter)); - type = camel_mime_part_get_content_type (mime_part); - if (header_content_type_param (type, "x-inline-pgp-hack")) { - /* this is a kludge around inline pgp signatures - basically, - the multipart/signed is faked - the original part (aka part #1) - is the original mime part and the signature is a copy of the - signature in part #1 */ - CamelMimeFilterCharset *charset_filter; - CamelContentType *content_type; - const char *charset; - - content_type = camel_mime_part_get_content_type (part); - charset = header_content_type_param (content_type, "charset"); - if (charset) { - charset_filter = camel_mime_filter_charset_new_convert ("utf-8", charset); - if (charset_filter) { - camel_stream_filter_add (filtered_stream, - CAMEL_MIME_FILTER (charset_filter)); - camel_object_unref (CAMEL_OBJECT (charset_filter)); - } - } - - wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (part)); - } else - wrapper = CAMEL_DATA_WRAPPER (part); + 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); @@ -561,27 +538,6 @@ camel_pgp_mime_part_decrypt (CamelPgpContext *context, CamelMimePart *mime_part, camel_object_unref (CAMEL_OBJECT (ciphertext)); camel_stream_reset (stream); - mime_type = camel_mime_part_get_content_type (mime_part); - if (header_content_type_param (mime_type, "x-inline-pgp-hack")) { - /* this is a kludge around inline pgp encryption - basically, - the multipart/encrypted is fake - the original encrypted - content is not really an encrypted mime part so after - decrypting it, we have to fake some mime content headers */ - CamelStream *hack; - - hack = camel_stream_mem_new (); - -#define CONTENT_TYPE_TEXT_PLAIN "Content-Type: text/plain\r\n\r\n" - camel_stream_write (hack, CONTENT_TYPE_TEXT_PLAIN, - sizeof (CONTENT_TYPE_TEXT_PLAIN) - 1); - - camel_stream_write_to_stream (stream, hack); - camel_stream_reset (hack); - - camel_object_unref (CAMEL_OBJECT (stream)); - stream = hack; - } - /* construct the new decrypted mime part from the stream */ part = camel_mime_part_new (); |