[evolution-data-server/evolution-data-server-3-12] Bug 737930 - Claims invalid PGP signature for single line mail



commit e6fc880c02b3fd61ea6f74244bc8a9b082c3475a
Author: Christian Schaarschmidt <schaarsc gmx de>
Date:   Tue Oct 21 07:43:53 2014 +0200

    Bug 737930 - Claims invalid PGP signature for single line mail

 camel/camel-gpg-context.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/camel/camel-gpg-context.c b/camel/camel-gpg-context.c
index 2a3b94b..8c3104b 100644
--- a/camel/camel-gpg-context.c
+++ b/camel/camel-gpg-context.c
@@ -1880,16 +1880,15 @@ gpg_verify_sync (CamelCipherContext *context,
        canon_stream = camel_stream_mem_new ();
 
        /* strip trailing white-spaces */
-       filter = camel_stream_filter_new (canon_stream);
+       filter = camel_stream_filter_new (istream);
        canon = camel_mime_filter_canon_new (CAMEL_MIME_FILTER_CANON_CRLF | CAMEL_MIME_FILTER_CANON_STRIP);
        camel_stream_filter_add (CAMEL_STREAM_FILTER (filter), canon);
        g_object_unref (canon);
 
-       camel_stream_write_to_stream (istream, filter, NULL, NULL);
+       camel_stream_write_to_stream (filter, canon_stream, NULL, NULL);
 
        g_object_unref (filter);
-
-       g_seekable_seek (G_SEEKABLE (istream), 0, G_SEEK_SET, NULL, NULL);
+       g_object_unref (istream);
 
        g_seekable_seek (G_SEEKABLE (canon_stream), 0, G_SEEK_SET, NULL, NULL);
 
@@ -1945,7 +1944,7 @@ gpg_verify_sync (CamelCipherContext *context,
                g_unlink (sigfile);
                g_free (sigfile);
        }
-       g_object_unref (istream);
+
        g_object_unref (canon_stream);
 
        return validity;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]