Home GnuPG
Diffusion GnuPG 7e7f35a2d7d4

gpgparsemail: Allow weirdly-mixed pkcs7 signatures.
7e7f35a2d7d4Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

gpgparsemail: Allow weirdly-mixed pkcs7 signatures.

* 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

Details

Provenance
dkgAuthored on Feb 8 2016, 9:44 PM
wernerCommitted on Feb 18 2016, 12:15 PM
Parents
rG813df2fe6656: gpg: Clean up dangling agent_open and agent_closed declarations.
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rG7e7f35a2d7d4: gpgparsemail: Allow weirdly-mixed pkcs7 signatures. (authored by Daniel Kahn Gillmor <dkg@fifthhorseman.net>).Feb 18 2016, 12:15 PM