Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/ChangeLog,v
retrieving revision 1.96
diff -u -p -r1.96 ChangeLog
--- ChangeLog	18 Aug 2005 15:42:01 -0000	1.96
+++ ChangeLog	19 Aug 2005 07:08:01 -0000
@@ -1,3 +1,11 @@
+2005-08-19  Parthasarathi Susarla <sparthasarathi@novell.com>
+	
+	** see bug #313806
+
+	* camel-groupwise-utils.c:
+	(send_as_attachment): Encode the signature in base64. Thats
+	how the groupwise soap interface expects it.
+
 2005-08-18  Parthasarathi Susarla <sparthasarathi@novell.com>
 	
 	** see bug #312184
Index: camel-groupwise-utils.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/camel-groupwise-utils.c,v
retrieving revision 1.17
diff -u -p -r1.17 camel-groupwise-utils.c
--- camel-groupwise-utils.c	10 Aug 2005 03:41:39 -0000	1.17
+++ camel-groupwise-utils.c	19 Aug 2005 07:08:01 -0000
@@ -296,12 +296,26 @@ send_as_attachment (EGwConnection *cnc, 
 	len = content->buffer->len;
 
 	attachment = g_new0 (EGwItemAttachment, 1);
+	attachment->contentType = g_strdup_printf ("%s/%s", type->type, type->subtype);
+
 	if (filename) {
-		attachment->data = g_malloc0 (content->buffer->len+1);
-		attachment->data = memcpy (attachment->data, 
-				content->buffer->data, 
-				content->buffer->len);
-		attachment->size = content->buffer->len;
+		if (!strcmp (attachment->contentType, "application/pgp-signature")) {
+			char *temp_str;
+			int temp_len;
+			temp_str = soup_base64_encode (buffer, len);
+			temp_len = strlen (temp_str);
+			attachment->data = g_strdup (temp_str);
+			attachment->size = temp_len;
+			g_free (temp_str);
+			temp_str = NULL;
+			temp_len = 0;
+		} else {
+			attachment->data = g_malloc0 (content->buffer->len+1);
+			attachment->data = memcpy (attachment->data, 
+					content->buffer->data, 
+					content->buffer->len);
+			attachment->size = content->buffer->len;
+		}
 	} else {
 		char *temp_str;
 		int temp_len;
@@ -313,7 +327,6 @@ send_as_attachment (EGwConnection *cnc, 
 		temp_str = NULL;
 		temp_len = 0;
 	}
-	attachment->contentType = g_strdup_printf ("%s/%s", type->type, type->subtype);
 	
 	if (!strcmp (attachment->contentType, "text/html"))
 		filename = "text.htm";
