diff options
author | Not Zed <NotZed@Ximian.com> | 2003-12-10 14:14:28 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2003-12-10 14:14:28 +0800 |
commit | 9211df58c43e7b0644baaac259a5dce762c8a363 (patch) | |
tree | 5217ae9ff99569a971974d571aa317b9103e191a | |
parent | d7fbe9fe14e5eeea5b816a938616d8f2f4497560 (diff) | |
download | gsoc2013-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
-rw-r--r-- | camel/ChangeLog | 7 | ||||
-rw-r--r-- | camel/camel-smime-context.c | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 2b143cf31a..51d0f80d52 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,5 +1,12 @@ 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. + +2003-12-10 Not Zed <NotZed@Ximian.com> + * Makefile.am (libcamel_la_SOURCES): put the camel-smime-context.[ch] back in here, remove it from EXTRA_DIST, and make it compile optinally the same way camel-tcp-stream-ssl.c 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; |