]> git.notmuchmail.org Git - notmuch/blobdiff - test/crypto
Do not replace multipart/signed part with content part when doing verification.
[notmuch] / test / crypto
index ead05829dcdf4f8b00bb1dfbb654d853e9a86a2e..02516430999c31feac5c22250f4ab6ff93a6e44b 100755 (executable)
@@ -46,7 +46,7 @@ expected='[[[{"id": "XXXXX",
  "filename": "YYYYY",
  "timestamp": 946728000,
  "date_relative": "2000-01-01",
- "tags": ["inbox"],
+ "tags": ["inbox","signed"],
  "headers": {"Subject": "test signed message 001",
  "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
  "To": "test_suite@notmuchmail.org",
@@ -57,8 +57,12 @@ expected='[[[{"id": "XXXXX",
  "sigstatus": [{"status": "good",
  "fingerprint": "'$FINGERPRINT'",
  "created": 946728000}],
+ "content-type": "multipart/signed",
+ "content": [{"id": 2,
  "content-type": "text/plain",
- "content": "This is a test signed message.\n"}]},
+ "content": "This is a test signed message.\n"},
+ {"id": 3,
+ "content-type": "application/pgp-signature"}]}]},
  []]]]'
 test_expect_equal \
     "$output" \
@@ -76,7 +80,7 @@ expected='[[[{"id": "XXXXX",
  "filename": "YYYYY",
  "timestamp": 946728000,
  "date_relative": "2000-01-01",
- "tags": ["inbox"],
+ "tags": ["inbox","signed"],
  "headers": {"Subject": "test signed message 001",
  "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
  "To": "test_suite@notmuchmail.org",
@@ -88,8 +92,12 @@ expected='[[[{"id": "XXXXX",
  "fingerprint": "'$FINGERPRINT'",
  "created": 946728000,
  "userid": " Notmuch Test Suite <test_suite@notmuchmail.org> (INSECURE!)"}],
+ "content-type": "multipart/signed",
+ "content": [{"id": 2,
  "content-type": "text/plain",
- "content": "This is a test signed message.\n"}]},
+ "content": "This is a test signed message.\n"},
+ {"id": 3,
+ "content-type": "application/pgp-signature"}]}]},
  []]]]'
 test_expect_equal \
     "$output" \
@@ -106,7 +114,7 @@ expected='[[[{"id": "XXXXX",
  "filename": "YYYYY",
  "timestamp": 946728000,
  "date_relative": "2000-01-01",
- "tags": ["inbox"],
+ "tags": ["inbox","signed"],
  "headers": {"Subject": "test signed message 001",
  "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
  "To": "test_suite@notmuchmail.org",
@@ -117,8 +125,12 @@ expected='[[[{"id": "XXXXX",
  "sigstatus": [{"status": "error",
  "keyid": "'$(echo $FINGERPRINT | cut -c 25-)'",
  "errors": 2}],
+ "content-type": "multipart/signed",
+ "content": [{"id": 2,
  "content-type": "text/plain",
- "content": "This is a test signed message.\n"}]},
+ "content": "This is a test signed message.\n"},
+ {"id": 3,
+ "content-type": "application/pgp-signature"}]}]},
  []]]]'
 test_expect_equal \
     "$output" \
@@ -141,7 +153,7 @@ output=$(notmuch show --format=text --decrypt subject:"test encrypted message 00
     | sed -e 's|"created": [1234567890]*|"created": 946728000|')
 expected='\fmessage{ id:XXXXX depth:0 match:1 filename:XXXXX
 \fheader{
-Notmuch Test Suite <test_suite@notmuchmail.org> (2000-01-01) (inbox)
+Notmuch Test Suite <test_suite@notmuchmail.org> (2000-01-01) (encrypted inbox)
 Subject: test encrypted message 001
 From: Notmuch Test Suite <test_suite@notmuchmail.org>
 To: test_suite@notmuchmail.org
@@ -172,7 +184,7 @@ expected='[[[{"id": "XXXXX",
  "filename": "YYYYY",
  "timestamp": 946728000,
  "date_relative": "2000-01-01",
- "tags": ["inbox"],
+ "tags": ["encrypted","inbox"],
  "headers": {"Subject": "test encrypted message 001",
  "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
  "To": "test_suite@notmuchmail.org",
@@ -223,7 +235,7 @@ expected='[[[{"id": "XXXXX",
  "filename": "YYYYY",
  "timestamp": 946728000,
  "date_relative": "2000-01-01",
- "tags": ["inbox"],
+ "tags": ["encrypted","inbox"],
  "headers": {"Subject": "test encrypted message 001",
  "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
  "To": "test_suite@notmuchmail.org",
@@ -258,7 +270,7 @@ expected='[[[{"id": "XXXXX",
  "filename": "YYYYY",
  "timestamp": 946728000,
  "date_relative": "2000-01-01",
- "tags": ["inbox"],
+ "tags": ["encrypted","inbox"],
  "headers": {"Subject": "test encrypted message 002",
  "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
  "To": "test_suite@notmuchmail.org",
@@ -309,7 +321,7 @@ expected='[[[{"id": "XXXXX",
  "filename": "YYYYY",
  "timestamp": 946728000,
  "date_relative": "2000-01-01",
- "tags": ["inbox"],
+ "tags": ["inbox","signed"],
  "headers": {"Subject": "test signed message 001",
  "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
  "To": "test_suite@notmuchmail.org",
@@ -320,8 +332,12 @@ expected='[[[{"id": "XXXXX",
  "sigstatus": [{"status": "error",
  "keyid": "6D92612D94E46381",
  "errors": 8}],
+ "content-type": "multipart/signed",
+ "content": [{"id": 2,
  "content-type": "text/plain",
- "content": "This is a test signed message.\n"}]},
+ "content": "This is a test signed message.\n"},
+ {"id": 3,
+ "content-type": "application/pgp-signature"}]}]},
  []]]]'
 test_expect_equal \
     "$output" \