aboutsummaryrefslogtreecommitdiff
path: root/test/T190-multipart.sh
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2019-05-25 14:04:06 -0400
committerDavid Bremner <david@tethera.net>2019-05-26 08:20:23 -0300
commit4cb789aa090fb6ba3c7897584ecbcc0a547b2f81 (patch)
tree0bc7df43eb4d4450ddfac4651376785ed1ce2c29 /test/T190-multipart.sh
parentd187a6993e25b1e100790e918156f5d95d371899 (diff)
cli/show: emit new whole-message crypto status output
This allows MUAs that don't want to think about per-mime-part cryptographic status to have a simple high-level overview of the message's cryptographic state. Sensibly structured encrypted and/or signed messages will work fine with this. The only requirement for the simplest encryption + signing is that the message have all of its encryption and signing protection (the "cryptographic envelope") in a contiguous set of MIME layers at the very outside of the message itself. This is because messages with some subparts signed or encrypted, but with other subparts with no cryptographic protection is very difficult to reason about, and even harder for the user to make sense of or work with. For further characterization of the Cryptographic Envelope and some of the usability tradeoffs, see here: https://dkg.fifthhorseman.net/blog/e-mail-cryptography.html#cryptographic-envelope
Diffstat (limited to 'test/T190-multipart.sh')
-rwxr-xr-xtest/T190-multipart.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/T190-multipart.sh b/test/T190-multipart.sh
index 5cfa9d33..6f715ff9 100755
--- a/test/T190-multipart.sh
+++ b/test/T190-multipart.sh
@@ -378,7 +378,7 @@ test_expect_success "notmuch show --format=text --part=8 'id:87liy5ap00.fsf@yoom
test_begin_subtest "--format=json --part=0, full message"
notmuch show --format=json --part=0 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
cat <<EOF >EXPECTED
-{"id": "87liy5ap00.fsf@yoom.home.cworth.org", "match": true, "excluded": false, "filename": ["${MAIL_DIR}/multipart"], "timestamp": 978709437, "date_relative": "2001-01-05", "tags": ["attachment","inbox","signed","unread"], "headers": {"Subject": "Multipart message", "From": "Carl Worth <cworth@cworth.org>", "To": "cworth@cworth.org", "Date": "Fri, 05 Jan 2001 15:43:57 +0000"}, "body": [
+{"id": "87liy5ap00.fsf@yoom.home.cworth.org", "crypto": {}, "match": true, "excluded": false, "filename": ["${MAIL_DIR}/multipart"], "timestamp": 978709437, "date_relative": "2001-01-05", "tags": ["attachment","inbox","signed","unread"], "headers": {"Subject": "Multipart message", "From": "Carl Worth <cworth@cworth.org>", "To": "cworth@cworth.org", "Date": "Fri, 05 Jan 2001 15:43:57 +0000"}, "body": [
{"id": 1, "content-type": "multipart/signed", "content": [
{"id": 2, "content-type": "multipart/mixed", "content": [
{"id": 3, "content-type": "message/rfc822", "content-disposition": "inline", "content": [{"headers": {"Subject": "html message", "From": "Carl Worth <cworth@cworth.org>", "To": "cworth@cworth.org", "Date": "Fri, 05 Jan 2001 15:42:57 +0000"}, "body": [
@@ -637,6 +637,7 @@ notmuch_json_show_sanitize <<EOF >EXPECTED
"In-reply-to": "<87liy5ap00.fsf@yoom.home.cworth.org>",
"References": "<87liy5ap00.fsf@yoom.home.cworth.org>"},
"original": {"id": "XXXXX",
+ "crypto": {},
"match": false,
"excluded": false,
"filename": ["YYYYY"],
@@ -728,6 +729,7 @@ cat_expected_head ()
{
cat <<EOF
[[[{"id": "htmlmessage", "match":true, "excluded": false, "date_relative":"2000-01-01",
+ "crypto": {},
"timestamp": 946684800,
"filename": ["${MAIL_DIR}/include-html"],
"tags": ["inbox", "unread"],