summaryrefslogtreecommitdiff
path: root/camel/camel-cipher-context.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-11-21 17:56:07 +0100
committerMilan Crha <mcrha@redhat.com>2012-11-21 17:56:07 +0100
commit01a2e2d8b769f3ce1bbf2eba83afbea765711197 (patch)
treee3e0df02e99e74fc91443c5b84368bd09acd9cfb /camel/camel-cipher-context.c
parente0904c3a41d04e41093b649fbc178eb1eb917215 (diff)
downloadevolution-data-server-01a2e2d8b769f3ce1bbf2eba83afbea765711197.tar.gz
Bug #687670 - Signing with both pgp and S/MIME causes a broken signature
Diffstat (limited to 'camel/camel-cipher-context.c')
-rw-r--r--camel/camel-cipher-context.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/camel/camel-cipher-context.c b/camel/camel-cipher-context.c
index fa46bd674..04be06c89 100644
--- a/camel/camel-cipher-context.c
+++ b/camel/camel-cipher-context.c
@@ -37,6 +37,8 @@
#include "camel-mime-utils.h"
#include "camel-medium.h"
#include "camel-multipart.h"
+#include "camel-multipart-encrypted.h"
+#include "camel-multipart-signed.h"
#include "camel-mime-message.h"
#include "camel-mime-filter-canon.h"
#include "camel-stream-filter.h"
@@ -1814,6 +1816,10 @@ cc_prepare_sign (CamelMimePart *part)
if (!dw)
return;
+ /* should not change encoding for these, they have the right encoding set already */
+ if (CAMEL_IS_MULTIPART_SIGNED (dw) || CAMEL_IS_MULTIPART_ENCRYPTED (dw))
+ return;
+
if (CAMEL_IS_MULTIPART (dw)) {
parts = camel_multipart_get_number ((CamelMultipart *) dw);
for (i = 0; i < parts; i++)