[PATCH 10/15] tests/smime: Verify cryptographic message status

Daniel Kahn Gillmor dkg at fifthhorseman.net
Tue Apr 28 11:57:18 PDT 2020


When consuming a signed+encrypted S/MIME message generated by emacs,
we expect to see the same cryptographic properties for the message as
a whole.  This is not done correctly yet, so the test is marked as
known broken.

Signed-off-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
---
 test/T355-smime.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/test/T355-smime.sh b/test/T355-smime.sh
index e92a7b16..f3956a34 100755
--- a/test/T355-smime.sh
+++ b/test/T355-smime.sh
@@ -88,4 +88,13 @@ This is a test encrypted message.
 EOF
 test_expect_equal_file EXPECTED OUTPUT
 
+test_begin_subtest "Cryptographic message status (encrypted+signed)"
+test_subtest_known_broken
+output=$(notmuch show --format=json --decrypt=true subject:"test encrypted message 001")
+test_json_nodes <<<"$output" \
+                'crypto_encrypted:[0][0][0]["crypto"]["decrypted"]["status"]="full"' \
+                'crypto_sigok:[0][0][0]["crypto"]["signed"]["status"][0]["status"]="good"' \
+                'crypto_fpr:[0][0][0]["crypto"]["signed"]["status"][0]["fingerprint"]="616F46CD73834C63847756AF0DFB64A6E0972A47"' \
+                'crypto_uid:[0][0][0]["crypto"]["signed"]["status"][0]["userid"]="CN=Notmuch Test Suite"'
+
 test_done
-- 
2.26.2



More information about the notmuch mailing list