How to handle multipart messages (RFC 2440) and verify them
wk at gnupg.org
Mon Jan 17 18:22:43 CET 2005
On Mon, 17 Jan 2005 16:58:22 +0100, "Thomas Zangl said:
> I would really appriciate any help :) I already spent 2 days with this
> :-/ (RFC 1847, 2015, 2440 and 3156 do not have such an example..)
2015 and 3156 do have such an example. Your code only contains
another MIME container as signed part but that does'nt change anything
for your parser. Recall that you need to keep track of the different
boundaries; either by ignoring inner ones or by stacking them up.
Signed material begin with the next line
Content-Type: multipart/signed; protocol="application/pgp-sig
Content-Type: text/plain; charset=US-ASCII
The attached patch fixes a bug when playing ogm files with su
Signed material ends with the previous line or to be exact just before the
final line feed of that line. In other words: the linefeed before the
next boundary belongs to the boundary an is not part of the signed material.
You may throw the follwiong part in its entire into gpg.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
-----END PGP SIGNATURE-----
gnupg 1.9 has an uncompleted tools/gpgparsemail.c which shows how to
parse MIME encrypted or signed messages.
More information about the Gnupg-users