aboutsummaryrefslogtreecommitdiff
path: root/test/crypto
diff options
context:
space:
mode:
authorJameson Graef Rollins <jrollins@finestructure.net>2011-05-27 03:27:36 -0700
committerCarl Worth <cworth@cworth.org>2011-05-27 16:22:00 -0700
commit54045197498f540b4ba96344073994bac13a3039 (patch)
tree5584ff5cb08621400b8cf470d73e53de14ff1e52 /test/crypto
parent1d6b49561f50d6cde1b473f9887e37748e49c02c (diff)
Do not replace multipart/signed part with content part when doing verification.
Some folks have complained about the part renumbering that occurs when the entire multipart/signed part is replaced with the part contents after verification. This is primarily because it incurs an additional computational cost to retrieve individual parts, since verification has to be performed again to ensure that part numbering is consistent. This patch simply leaves the full multipart/signed part as is. The emacs crypto test is also updated to reflect this change.
Diffstat (limited to 'test/crypto')
-rwxr-xr-xtest/crypto24
1 files changed, 20 insertions, 4 deletions
diff --git a/test/crypto b/test/crypto
index 21a6013..0251643 100755
--- a/test/crypto
+++ b/test/crypto
@@ -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" \
@@ -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" \
@@ -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" \
@@ -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" \