* tools/gpgparsemail.c (parse_message): Revert the change.
* tools/rfc822parse.c (transition_to_body): Set ERRNO.
(transition_to_header, insert_header): Likewise.
--
In the comment of rfc822parse_* functions, it explicitly explained
setting ERRNO on error. For parser errors, it may not have
appropriate ERRNO, in such a case, use ENOENT.
Fixes-commit: c13e459ffe
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* tools/gpgparsemail.c: Add and check info->signing_protocol_2.
--
Some mailers in the wild will generate messages that have the a weird
structure where they use the x- prefix in one part and drop it in
another.
For example, the main MIME part as a whole has:
Content-Type: multipart/signed;
protocol="application/x-pkcs7-signature"
but the signature sub-part has:
Content-Type: application/pkcs7-signature
(or vice versa, where the x- prefix is in the sub-part but not the
protocol= section on the main MIME object)
This change also avoids allocating strings for these comparisons,
since the const strings in question are already available in the built
executable, and no dynamic labels are needed.
===
- 2 lines reformatted to keep them below 90 cols. - wk
--
For unknown reason I used the term MOSS for an RFC1847 structure.
MOSS is a historic and broken security format for MIME define in 1848.
To avoid misunderstandings this patch changes the term to SMFM which
stands for Security Multiparts for MIME (rfc-1847).
The asymmetric quotes used by GNU in the past (`...') don't render
nicely on modern systems. We now use two \x27 characters ('...').
The proper solution would be to use the correct Unicode symmetric
quotes here. However this has the disadvantage that the system
requires Unicode support. We don't want that today. If Unicode is
available a generated po file can be used to output proper quotes. A
simple sed script like the one used for en@quote is sufficient to
change them.
The changes have been done by applying
sed -i "s/\`\([^'\`]*\)'/'\1'/g"
to most files and fixing obvious problems by hand. The msgid strings in
the po files were fixed with a similar command.
* sign.c (add_certificate_list): Decrement N for the first cert.
* Makefile.am (sbin_SCRIPTS): New, to install addgnupghome.
(EXTRA_DIST): Added rfc822parse.c rfc822parse.h gpgparsemail.c
which might be useful for debugging.