I don't see how GMime would change the multipart bounaries. I can only presume that perhaps Balsa changed them after signing?
If you can show me where GMime went wrong, please do...
Cheers, Albrecht.
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Albrecht Dreß - Johanna-Kirchner-Straße 13 - D-53123 Bonn (Germany) Phone (+49) 228 6199571 - mailto:albrecht dress arcor de _________________________________________________________________________
#include <gmime/gmime.h>
#define MY_MAIL "albrecht dress arcor de"
int main (int argc, char ** argv)
{
GMimePart *part;
GMimeMultipart *mp;
GMimeSession *session;
GMimeCipherContext *ctx;
GMimeMultipartSigned *mps;
GError *error = NULL;
gchar * cont;
g_mime_init(0);
mp = g_mime_multipart_new_with_subtype("mixed");
part = g_mime_part_new_with_type("text", "plain");
g_mime_part_set_content(part, "this is part 1", 14);
g_mime_multipart_add_part(mp, GMIME_OBJECT(part));
g_object_unref(G_OBJECT(part));
part = g_mime_part_new_with_type("text", "plain");
g_mime_part_set_content(part, "this is part 2", 14);
g_mime_multipart_add_part(mp, GMIME_OBJECT(part));
g_object_unref(G_OBJECT(part));
cont = g_mime_object_to_string(GMIME_OBJECT(mp));
g_message("before signing: '%s'", cont);
g_free(cont);
session = g_object_new(g_mime_session_get_type(), NULL, NULL);
ctx = g_mime_gpg_context_new(session, "/usr/bin/gpg");
mps = g_mime_multipart_signed_new();
g_mime_multipart_signed_sign(mps, GMIME_OBJECT(mp), ctx, MY_MAIL,
GMIME_CIPHER_HASH_DEFAULT, &error);
cont = g_mime_object_to_string(GMIME_OBJECT(mps));
g_message("after signing: '%s'", cont);
g_free(cont);
return 0;
}
** Message: before signing: 'Content-Type: multipart/mixed; boundary="=-SmgxjvJuJCvPRQPZa6v/" --=-SmgxjvJuJCvPRQPZa6v/ Content-Type: text/plain this is part 1 --=-SmgxjvJuJCvPRQPZa6v/ Content-Type: text/plain this is part 2 --=-SmgxjvJuJCvPRQPZa6v/-- ' (process:635): gmime-CRITICAL **: file gmime-content-type.c: line 271 (g_mime_content_type_set_parameter): assertion `value != NULL' failed ** Message: after signing: 'Content-Type: multipart/signed; protocol="application/pgp-signature"; boundary="=-FleBv2T4nMqbVqhKwA+o" --=-FleBv2T4nMqbVqhKwA+o Content-Type: multipart/mixed; boundary="=-NuQScCo3Ocknsx7J1gyK" --=-NuQScCo3Ocknsx7J1gyK Content-Type: text/plain Content-Transfer-Encoding: quoted-printable this is part 1 --=-NuQScCo3Ocknsx7J1gyK Content-Type: text/plain Content-Transfer-Encoding: quoted-printable this is part 2 --=-NuQScCo3Ocknsx7J1gyK-- --=-FleBv2T4nMqbVqhKwA+o Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQBA5wkTn/9unNAn/9ERAhkFAKCHW03sqK41fkAMFK64WzgZ6StcSQCgjqrS r5dqlAj1iWwQ/bl3eq5inmw= =M9TG -----END PGP SIGNATURE----- --=-FleBv2T4nMqbVqhKwA+o-- '
Attachment:
pgpMLLYeLstut.pgp
Description: PGP signature