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.
}
if ((selected || state->in_zone) && format->part_sigstatus)
format->part_sigstatus (sigvalidity);
}
if ((selected || state->in_zone) && format->part_sigstatus)
format->part_sigstatus (sigvalidity);
- /* extract only data part, and ignore signature part */
- part = g_mime_multipart_get_part (multipart, 0);
if (sigvalidity)
g_mime_signature_validity_free (sigvalidity);
}
if (sigvalidity)
g_mime_signature_validity_free (sigvalidity);
}
"sigstatus": [{"status": "good",
"fingerprint": "'$FINGERPRINT'",
"created": 946728000}],
"sigstatus": [{"status": "good",
"fingerprint": "'$FINGERPRINT'",
"created": 946728000}],
+ "content-type": "multipart/signed",
+ "content": [{"id": 2,
"content-type": "text/plain",
"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" \
[]]]]'
test_expect_equal \
"$output" \
"fingerprint": "'$FINGERPRINT'",
"created": 946728000,
"userid": " Notmuch Test Suite <test_suite@notmuchmail.org> (INSECURE!)"}],
"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-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" \
[]]]]'
test_expect_equal \
"$output" \
"sigstatus": [{"status": "error",
"keyid": "'$(echo $FINGERPRINT | cut -c 25-)'",
"errors": 2}],
"sigstatus": [{"status": "error",
"keyid": "'$(echo $FINGERPRINT | cut -c 25-)'",
"errors": 2}],
+ "content-type": "multipart/signed",
+ "content": [{"id": 2,
"content-type": "text/plain",
"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" \
[]]]]'
test_expect_equal \
"$output" \
"sigstatus": [{"status": "error",
"keyid": "6D92612D94E46381",
"errors": 8}],
"sigstatus": [{"status": "error",
"keyid": "6D92612D94E46381",
"errors": 8}],
+ "content-type": "multipart/signed",
+ "content": [{"id": 2,
"content-type": "text/plain",
"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" \
[]]]]'
test_expect_equal \
"$output" \