aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-pgp-mime.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-09-27 04:50:58 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-09-27 04:50:58 +0800
commitce3e488074e540d16b972e1dc691d2a8ea3f825b (patch)
tree3943ceb5012f220245bed1f3afde39d1b3c4eff1 /camel/camel-pgp-mime.c
parent87def266b0efafd38ae3a4886e2af3ee1996bdc2 (diff)
downloadgsoc2013-evolution-ce3e488074e540d16b972e1dc691d2a8ea3f825b.tar
gsoc2013-evolution-ce3e488074e540d16b972e1dc691d2a8ea3f825b.tar.gz
gsoc2013-evolution-ce3e488074e540d16b972e1dc691d2a8ea3f825b.tar.bz2
gsoc2013-evolution-ce3e488074e540d16b972e1dc691d2a8ea3f825b.tar.lz
gsoc2013-evolution-ce3e488074e540d16b972e1dc691d2a8ea3f825b.tar.xz
gsoc2013-evolution-ce3e488074e540d16b972e1dc691d2a8ea3f825b.tar.zst
gsoc2013-evolution-ce3e488074e540d16b972e1dc691d2a8ea3f825b.zip
New function to convenience Larry ;-)
2001-09-26 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-message.c (camel_mime_message_get_part_by_content_id): New function to convenience Larry ;-) * camel-pgp-mime.c (camel_pgp_mime_is_rfc2015_signed): block out some code if ENABLE_PEDANTIC_PGPMIME is not defined. svn path=/trunk/; revision=13165
Diffstat (limited to 'camel/camel-pgp-mime.c')
-rw-r--r--camel/camel-pgp-mime.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/camel/camel-pgp-mime.c b/camel/camel-pgp-mime.c
index 4b38b829da..149e1baf3b 100644
--- a/camel/camel-pgp-mime.c
+++ b/camel/camel-pgp-mime.c
@@ -47,14 +47,17 @@ camel_pgp_mime_is_rfc2015_signed (CamelMimePart *mime_part)
CamelMultipart *mp;
CamelMimePart *part;
CamelContentType *type;
- const gchar *param, *micalg;
+#ifdef ENABLE_PEDANTIC_PGPMIME
+ const char *param, *micalg;
+#endif
int nparts;
/* check that we have a multipart/signed */
type = camel_mime_part_get_content_type (mime_part);
if (!header_content_type_is (type, "multipart", "signed"))
return FALSE;
-
+
+#ifdef ENABLE_PEDANTIC_PGPMIME
/* check that we have a protocol param with the value: "application/pgp-signature" */
param = header_content_type_param (type, "protocol");
if (!param || g_strcasecmp (param, "application/pgp-signature"))
@@ -64,6 +67,7 @@ camel_pgp_mime_is_rfc2015_signed (CamelMimePart *mime_part)
micalg = header_content_type_param (type, "micalg");
if (!micalg)
return FALSE;
+#endif /* ENABLE_PEDANTIC_PGPMIME */
/* check that we have exactly 2 subparts */
wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
@@ -95,18 +99,22 @@ camel_pgp_mime_is_rfc2015_encrypted (CamelMimePart *mime_part)
CamelMultipart *mp;
CamelMimePart *part;
CamelContentType *type;
- const gchar *param;
+#ifdef ENABLE_PEDANTIC_PGPMIME
+ const char *param;
+#endif
int nparts;
/* check that we have a multipart/encrypted */
type = camel_mime_part_get_content_type (mime_part);
if (!header_content_type_is (type, "multipart", "encrypted"))
return FALSE;
-
+
+#ifdef ENABLE_PEDANTIC_PGPMIME
/* check that we have a protocol param with the value: "application/pgp-encrypted" */
param = header_content_type_param (type, "protocol");
if (!param || g_strcasecmp (param, "application/pgp-encrypted"))
return FALSE;
+#endif /* ENABLE_PEDANTIC_PGPMIME */
/* check that we have at least 2 subparts */
wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));