aboutsummaryrefslogtreecommitdiff
path: root/test/T355-smime.sh
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2020-04-28 14:57:19 -0400
committerDavid Bremner <david@tethera.net>2020-04-30 17:56:13 -0300
commit92149485cb5cd4af3d2c6c4856a2423da92dc727 (patch)
tree005ba7699b8d3d51da1bb04ffd1424f477b5cf89 /test/T355-smime.sh
parenta8bf94af44b21449d8f28478013400c096b0241d (diff)
tests/smime: Test indexing cleartext of envelopedData
These tests describe some simple behavior we would expect to work if we were to correctly index the cleartext of encrypted S/MIME messages (PKCS#7 envelopedData). Of course, they don't currently pass, so we mark them known-broken. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Diffstat (limited to 'test/T355-smime.sh')
-rwxr-xr-xtest/T355-smime.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/T355-smime.sh b/test/T355-smime.sh
index f3956a34..14e4531d 100755
--- a/test/T355-smime.sh
+++ b/test/T355-smime.sh
@@ -97,4 +97,26 @@ test_json_nodes <<<"$output" \
'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_begin_subtest "encrypted+signed message is known to be encrypted, but signature is unknown"
+test_subtest_known_broken
+output=$(notmuch search subject:"test encrypted message 001")
+test_expect_equal "$output" "thread:0000000000000002 2000-01-01 [1/1] Notmuch Test Suite; test encrypted message 001 (encrypted inbox)"
+
+test_begin_subtest "Encrypted body is not indexed"
+output=$(notmuch search 'this is a test encrypted message')
+test_expect_equal "$output" ""
+
+test_begin_subtest "Reindex cleartext"
+test_expect_success "notmuch reindex --decrypt=true subject:'test encrypted message 001'"
+
+test_begin_subtest "signature is now known"
+test_subtest_known_broken
+output=$(notmuch search subject:"test encrypted message 001")
+test_expect_equal "$output" "thread:0000000000000002 2000-01-01 [1/1] Notmuch Test Suite; test encrypted message 001 (encrypted inbox signed)"
+
+test_begin_subtest "Encrypted body is indexed"
+test_subtest_known_broken
+output=$(notmuch search 'this is a test encrypted message')
+test_expect_equal "$output" "thread:0000000000000002 2000-01-01 [1/1] Notmuch Test Suite; test encrypted message 001 (encrypted inbox signed)"
+
test_done