util/repair: add _notmuch_repair_crypto_payload_skip_legacy_display
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Thu, 29 Aug 2019 15:38:51 +0000 (11:38 -0400)
committerDavid Bremner <david@tethera.net>
Sun, 1 Sep 2019 11:40:33 +0000 (08:40 -0300)
commitff3d873f0b80b023764fe9d3fc0609b81d82775e
tree6928c992c6024aef5cc1e2cb159318e68bb7a82b
parentab0ae8b1c086ca3878f16ce40cc421eeb206c79e
util/repair: add _notmuch_repair_crypto_payload_skip_legacy_display

This is a utility function designed to make it easier to
"fast-forward" past a legacy-display part associated with a
cryptographic envelope, and show the user the intended message body.

The bulk of the ugliness in here is in the test function
_notmuch_crypto_payload_has_legacy_display, which tests all of the
things we'd expect to be true in a a cryptographic payload that
contains a legacy display part.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
util/repair.c
util/repair.h