aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-smime-context.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2003-12-10 14:14:28 +0800
committerMichael Zucci <zucchi@src.gnome.org>2003-12-10 14:14:28 +0800
commit9211df58c43e7b0644baaac259a5dce762c8a363 (patch)
tree5217ae9ff99569a971974d571aa317b9103e191a /camel/camel-smime-context.c
parentd7fbe9fe14e5eeea5b816a938616d8f2f4497560 (diff)
downloadgsoc2013-evolution-9211df58c43e7b0644baaac259a5dce762c8a363.tar.gz
gsoc2013-evolution-9211df58c43e7b0644baaac259a5dce762c8a363.tar.zst
gsoc2013-evolution-9211df58c43e7b0644baaac259a5dce762c8a363.zip
also check application/pkcs7-signature (bloody applemail).
2003-12-10 Not Zed <NotZed@Ximian.com> * camel-smime-context.c (sm_verify): also check application/pkcs7-signature (bloody applemail). (camel_smime_context_describe_part): as above, and fix the logic. dont think its used anyway. Bug #51750. svn path=/trunk/; revision=23908
Diffstat (limited to 'camel/camel-smime-context.c')
-rw-r--r--camel/camel-smime-context.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/camel/camel-smime-context.c b/camel/camel-smime-context.c
index 64bf07d74c..5b29d47681 100644
--- a/camel/camel-smime-context.c
+++ b/camel/camel-smime-context.c
@@ -159,7 +159,9 @@ camel_smime_context_describe_part(CamelSMIMEContext *context, CamelMimePart *par
if (camel_content_type_is(ct, "multipart", "signed")) {
tmp = camel_content_type_param(ct, "protocol");
- if (tmp && g_ascii_strcasecmp(tmp, ((CamelCipherContext *)context)->sign_protocol))
+ if (tmp &&
+ (g_ascii_strcasecmp(tmp, ((CamelCipherContext *)context)->sign_protocol) == 0
+ || g_ascii_strcasecmp(tmp, "application/pkcs7-signature") == 0))
flags = CAMEL_SMIME_SIGNED;
} else if (camel_content_type_is(ct, "application", "x-pkcs7-mime")) {
CamelStreamMem *istream;
@@ -700,7 +702,8 @@ sm_verify(CamelCipherContext *context, CamelMimePart *ipart, CamelException *ex)
tmp = camel_content_type_param(ct, "protocol");
if (!CAMEL_IS_MULTIPART_SIGNED(mps)
|| tmp == NULL
- || g_ascii_strcasecmp(tmp, context->sign_protocol) != 0) {
+ || (g_ascii_strcasecmp(tmp, context->sign_protocol) != 0
+ && g_ascii_strcasecmp(tmp, "application/pkcs7-signature") != 0)) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
_("Cannot verify message signature: Incorrect message format"));
goto fail;