From 9211df58c43e7b0644baaac259a5dce762c8a363 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Wed, 10 Dec 2003 06:14:28 +0000 Subject: also check application/pkcs7-signature (bloody applemail). 2003-12-10 Not Zed * 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 --- camel/ChangeLog | 7 +++++++ camel/camel-smime-context.c | 7 +++++-- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'camel') diff --git a/camel/ChangeLog b/camel/ChangeLog index 2b143cf31a..51d0f80d52 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,10 @@ +2003-12-10 Not Zed + + * 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. + 2003-12-10 Not Zed * Makefile.am (libcamel_la_SOURCES): put the 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; -- cgit