X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=test%2FT356-protected-headers.sh;h=62d7e2106bdea0b14690ae44d8186c7dda36e8e4;hb=996ef5710cd5b9a5de6394018f21955a775f7511;hp=59ab58d7b876c7127daa42dd9593f0a8d541bddd;hpb=1c879f39391b1144bfb2328fe778ab7d7e582100;p=notmuch diff --git a/test/T356-protected-headers.sh b/test/T356-protected-headers.sh index 59ab58d7..62d7e210 100755 --- a/test/T356-protected-headers.sh +++ b/test/T356-protected-headers.sh @@ -2,7 +2,6 @@ # TODO: # * check S/MIME as well as PGP/MIME -# * process headers protected by signature test_description='Message decryption with protected headers' . $(dirname "$0")/test-lib.sh || exit 1 @@ -67,4 +66,14 @@ test_json_nodes <<<"$output" \ 'crypto:[0][0][0]["crypto"]={"decrypted": {"status": "full", "header-mask": {"Subject": "Subject Unavailable"}}}' \ 'subject:[0][0][0]["headers"]["Subject"]="This is a message using draft-melnikov-smime-header-signing"' +test_begin_subtest "show cryptographic envelope on signed mail" +output=$(notmuch show --verify --format=json id:simple-signed-mail@crypto.notmuchmail.org) +test_json_nodes <<<"$output" \ + 'crypto:[0][0][0]["crypto"]={"signed": {"status": [{"created": 1525609971, "fingerprint": "'$FINGERPRINT'", "userid": "'"$SELF_USERID"'", "status": "good"}]}}' + +test_begin_subtest "verify signed protected header" +output=$(notmuch show --verify --format=json id:signed-protected-header@crypto.notmuchmail.org) +test_json_nodes <<<"$output" \ + 'crypto:[0][0][0]["crypto"]={"signed": {"status": [{"created": 1525350527, "fingerprint": "'$FINGERPRINT'", "userid": "'"$SELF_USERID"'", "status": "good"}], "headers": ["Subject"]}}' + test_done