Bug 1240290 - Improve handling of nested S/MIME messages, test data. r=mkmelin
authorKai Engert <kaie@kuix.de>
Thu, 19 Sep 2019 23:29:52 +0200
changeset 79043 5f3a5f96cc9b1b4f52f652e46fd433c4c08717ec
parent 79042 e17cea8e7c348566ed1c250396c796a9d18d4a00
child 79044 6542dc3163386308ccb3bd4db7e914d2eb402844
push id9343
push usergeoff@darktrojan.net
push dateFri, 20 Sep 2019 03:13:02 +0000
treeherdertry-comm-central@4913ab15d52b [default view] [failures only]
reviewersmkmelin
bugs1240290
Bug 1240290 - Improve handling of nested S/MIME messages, test data. r=mkmelin
mailnews/test/data/smime/Alice.p12
mailnews/test/data/smime/Bob.p12
mailnews/test/data/smime/Dave.p12
mailnews/test/data/smime/Eve.p12
mailnews/test/data/smime/TestCA.pem
mailnews/test/data/smime/alice.dsig.SHA1.multipart.bad.eml
mailnews/test/data/smime/alice.dsig.SHA1.multipart.eml
mailnews/test/data/smime/alice.dsig.SHA1.multipart.env.eml
mailnews/test/data/smime/alice.dsig.SHA1.multipart.mismatch-econtent.eml
mailnews/test/data/smime/alice.dsig.SHA256.multipart.bad.eml
mailnews/test/data/smime/alice.dsig.SHA256.multipart.eml
mailnews/test/data/smime/alice.dsig.SHA256.multipart.env.eml
mailnews/test/data/smime/alice.dsig.SHA256.multipart.mismatch-econtent.eml
mailnews/test/data/smime/alice.dsig.SHA384.multipart.bad.eml
mailnews/test/data/smime/alice.dsig.SHA384.multipart.eml
mailnews/test/data/smime/alice.dsig.SHA384.multipart.env.eml
mailnews/test/data/smime/alice.dsig.SHA384.multipart.mismatch-econtent.eml
mailnews/test/data/smime/alice.dsig.SHA512.multipart.bad.eml
mailnews/test/data/smime/alice.dsig.SHA512.multipart.eml
mailnews/test/data/smime/alice.dsig.SHA512.multipart.env.eml
mailnews/test/data/smime/alice.dsig.SHA512.multipart.mismatch-econtent.eml
mailnews/test/data/smime/alice.env.dsig.SHA1.multipart.dave.sig.SHA1.opaque.eml
mailnews/test/data/smime/alice.env.dsig.SHA1.multipart.eml
mailnews/test/data/smime/alice.env.dsig.SHA256.multipart.dave.sig.SHA256.opaque.eml
mailnews/test/data/smime/alice.env.dsig.SHA256.multipart.eml
mailnews/test/data/smime/alice.env.dsig.SHA384.multipart.dave.sig.SHA384.opaque.eml
mailnews/test/data/smime/alice.env.dsig.SHA384.multipart.eml
mailnews/test/data/smime/alice.env.dsig.SHA512.multipart.dave.sig.SHA512.opaque.eml
mailnews/test/data/smime/alice.env.dsig.SHA512.multipart.eml
mailnews/test/data/smime/alice.env.eml
mailnews/test/data/smime/alice.env.sig.SHA1.opaque.dave.sig.SHA1.opaque.eml
mailnews/test/data/smime/alice.env.sig.SHA1.opaque.eml
mailnews/test/data/smime/alice.env.sig.SHA256.opaque.dave.sig.SHA256.opaque.eml
mailnews/test/data/smime/alice.env.sig.SHA256.opaque.eml
mailnews/test/data/smime/alice.env.sig.SHA384.opaque.dave.sig.SHA384.opaque.eml
mailnews/test/data/smime/alice.env.sig.SHA384.opaque.eml
mailnews/test/data/smime/alice.env.sig.SHA512.opaque.dave.sig.SHA512.opaque.eml
mailnews/test/data/smime/alice.env.sig.SHA512.opaque.eml
mailnews/test/data/smime/alice.plain.dsig.SHA1.multipart.dave.dsig.SHA1.multipart.eml
mailnews/test/data/smime/alice.plain.dsig.SHA1.multipart.dave.sig.SHA1.opaque.eml
mailnews/test/data/smime/alice.plain.dsig.SHA256.multipart.dave.dsig.SHA256.multipart.eml
mailnews/test/data/smime/alice.plain.dsig.SHA256.multipart.dave.sig.SHA256.opaque.eml
mailnews/test/data/smime/alice.plain.dsig.SHA384.multipart.dave.dsig.SHA384.multipart.eml
mailnews/test/data/smime/alice.plain.dsig.SHA384.multipart.dave.sig.SHA384.opaque.eml
mailnews/test/data/smime/alice.plain.dsig.SHA512.multipart.dave.dsig.SHA512.multipart.eml
mailnews/test/data/smime/alice.plain.dsig.SHA512.multipart.dave.sig.SHA512.opaque.eml
mailnews/test/data/smime/alice.plain.sig.SHA1.opaque.dave.dsig.SHA1.multipart.eml
mailnews/test/data/smime/alice.plain.sig.SHA1.opaque.dave.sig.SHA1.opaque.eml
mailnews/test/data/smime/alice.plain.sig.SHA256.opaque.dave.dsig.SHA256.multipart.eml
mailnews/test/data/smime/alice.plain.sig.SHA256.opaque.dave.sig.SHA256.opaque.eml
mailnews/test/data/smime/alice.plain.sig.SHA384.opaque.dave.dsig.SHA384.multipart.eml
mailnews/test/data/smime/alice.plain.sig.SHA384.opaque.dave.sig.SHA384.opaque.eml
mailnews/test/data/smime/alice.plain.sig.SHA512.opaque.dave.dsig.SHA512.multipart.eml
mailnews/test/data/smime/alice.plain.sig.SHA512.opaque.dave.sig.SHA512.opaque.eml
mailnews/test/data/smime/alice.sig.SHA1.opaque.eml
mailnews/test/data/smime/alice.sig.SHA1.opaque.env.eml
mailnews/test/data/smime/alice.sig.SHA256.opaque.eml
mailnews/test/data/smime/alice.sig.SHA256.opaque.env.eml
mailnews/test/data/smime/alice.sig.SHA384.opaque.eml
mailnews/test/data/smime/alice.sig.SHA384.opaque.env.eml
mailnews/test/data/smime/alice.sig.SHA512.opaque.eml
mailnews/test/data/smime/alice.sig.SHA512.opaque.env.eml
index a168bdd1bd9956f083f5f708da1cb9ef373cddf1..046c1a059283036bb86859959efabf8aa4bfe6fe
GIT binary patch
literal 3526
zc${t3XHXLiwg%t;N$6FG6zM7iMF>TD4JGu@JJN#mUW5?DAV>tI_ud2oNC%}isR{@R
zBE1GsG;|Sx{l1;uy?5u{GjsmD@67r69MMQp5;D<9Fr`ooBIcBqgq)->@@6CuOY0^Y
z`TxWqLs2Y9@2}MYQ~#@?p&}tI!~#!5vA_e-n_#Mc$A6uL02zwBl}?Dk4W87e*`c_0
z-+QE_0t`SbaJc+^smljuv>XKYtlDi8D1XaZQ)3oZ{G5EBel_glWNm;R-iITIEWSgv
zO6KBtKvl~wlB&D$fI*$%w256)uHl8tGvPwBu_8VFd>TZ#1kw*AHqPg1bA#ek40uBC
zGi&_)?vioZJ72DXjN9tC+H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YPIi58f
-RRolH2/6nMn6Zf2z09ZVOyumbKfjYj2m3A==
+AQsFAAOCAQEArhnWDjcGcmRyl0VDBJck60b1WVuPGjJkoBU/Ywq4L8MTE/vD315v
+U4qxIZAg4K542F8fiA1D9C151AOzoEZgDmanSJ4vtmdbS14W5PSj4z2jhAGkIelk
+8NuzBYUORvCb7DoYX393USMTcC6MZp075J7mzULkiymsjoXSG12E3twjI1wNwh7f
+adk533+YtzrHyOe6JS8sMfs2luW89YJU9rFNc/DpnGiDrs66M5gIUj4m7IaJc2KT
+ZKmWdr114FuDz3Ntzpq1lG7WnhNVY4chiD0j7QstTtxTtZmh4kkmUCFz2ni20eOv
+Z3WpiiUawwHXuzrsBQBZKiCFULopmGFvZw==
 -----END CERTIFICATE-----
--- a/mailnews/test/data/smime/alice.dsig.SHA1.multipart.bad.eml
+++ b/mailnews/test/data/smime/alice.dsig.SHA1.multipart.bad.eml
@@ -18,41 +18,41 @@ Content-Type: application/pkcs7-signatur
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename=smime.p7s
 Content-Description: S/MIME Cryptographic Signature
 
 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAA
 oIIDYjCCA14wggJGoAMCAQICAR4wDQYJKoZIhvcNAQELBQAwZDELMAkGA1UEBhMC
 VVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcx
 EjAQBgNVBAoTCUJPR1VTIE5TUzEUMBIGA1UEAxMLTlNTIFRlc3QgQ0EwHhcNMTkw
-NzAzMTczMDA3WhcNMjQwNzAzMTczMDA3WjCBgDELMAkGA1UEBhMCVVMxEzARBgNV
+NzAzMTgxMDE0WhcNMjQwNzAzMTgxMDE0WjCBgDELMAkGA1UEBhMCVVMxEzARBgNV
 BAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxEjAQBgNVBAoT
 CUJPR1VTIE5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DASBgNVBAMTC05TUyBUZXN0IENBAgEeMHoGCyqGSIb3DQEJ
 EAILMWugaTBkMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQG
 A1UEBxMNTW91bnRhaW4gVmlldzESMBAGA1UEChMJQk9HVVMgTlNTMRQwEgYDVQQD
-EwtOU1MgVGVzdCBDQQIBHjANBgkqhkiG9w0BAQEFAASCAQBhAYUa+Ccopm7PavBb
-FjOLJVcd2u8KJ2+n2eiDQK8EWN90zd9q/Ba3eVLHBihbuMLgJ1964crCikBJTOSA
-PguHhdiUjs6GVYbRY9sZkYbVjDJ7pqWCj0TRpUuctOtSIfHJ0on+Kc1RPzV4Q9QY
-OKoHT9yRx3bSeNKeUjSzUz/fiMpxImnFerva0CaJCo30f0d7aJsnR1m1QRvbfnYQ
-ONaApLGJRAA79scSTRA8e16iwt5dkkpr+jabpfeHK94dYubk3RmA99NadN1pNvE4
-pOzC6rgBJ/nExeALjXM+bmhdeI6vqCpx99H5xGzV6BpSZAyRk07vT5HyhX4sYl/O
-xieMAAAAAAAA
+EwtOU1MgVGVzdCBDQQIBHjANBgkqhkiG9w0BAQEFAASCAQACHJp95tWVz8ZizLJw
+jIAbYT3GeEZoUOG0wYqDUN66m+M+HMRHN8xAfGkn2DapLsvRl2xhJkWMpN1tXKb5
+w5zaILltG6GuU2GK8n4Qbjs2I4NiVxJhhEsgUv9HzK80EJnAXKtxsLIvHIARrJI/
+l9pjfxcx68iLLZPAI7uTzvK9O8oExrkNlRZBlFw93kmkbYegaLeIL8hIkxg++vdb
+98b/dZE3Y4xcfa4X59QTj/5yN7zP16LJfMg6qy0uz8S4Aja9gJKwxLeS9VKl9xxk
+dcVHh9I6ySvBEbSPCp0mEuDkC6oPMecGT9PNp+hpvVjOZscvAa01WxYMGvni0uwR
+CGAWAAAAAAAA
 --------------ms030903020902020502030404--
 
--- a/mailnews/test/data/smime/alice.dsig.SHA1.multipart.eml
+++ b/mailnews/test/data/smime/alice.dsig.SHA1.multipart.eml
@@ -18,41 +18,41 @@ Content-Type: application/pkcs7-signatur
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename=smime.p7s
 Content-Description: S/MIME Cryptographic Signature
 
 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAA
 oIIDYjCCA14wggJGoAMCAQICAR4wDQYJKoZIhvcNAQELBQAwZDELMAkGA1UEBhMC
 VVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcx
 EjAQBgNVBAoTCUJPR1VTIE5TUzEUMBIGA1UEAxMLTlNTIFRlc3QgQ0EwHhcNMTkw
-NzAzMTczMDA3WhcNMjQwNzAzMTczMDA3WjCBgDELMAkGA1UEBhMCVVMxEzARBgNV
+NzAzMTgxMDE0WhcNMjQwNzAzMTgxMDE0WjCBgDELMAkGA1UEBhMCVVMxEzARBgNV
 BAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxEjAQBgNVBAoT
 CUJPR1VTIE5TUzEgMB4GCSqGSIb3DQEJARYRQWxpY2VAZXhhbXBsZS5jb20xDjAM
-BgNVBAMTBUFsaWNlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4F8P
-ZSndSoPhUMMdVU8cIVqWPx1Hg+OUZzfTk7vf8dnwOWJqtoT6O+5Ff432kPbIdjIm
-3m7Seo0eBC1s1W0z2kYztPkVCzSlAfMg/5bEpkPgVSWQjn2LxsYuDHRzrr/QnwUg
-+ZdwIFps29PcK8XFQeaKNc/rm4UYhRTZ34iEUQf7QQVSQZaxPZCunxj+qk+T1KaI
-Kd/KCLJX9hFXybbGM5TT0BaxQahdtls4aUnymmhoqQ3fJJwRIB6Lth/m1TPvKE5X
-j6boivY0A0DGhFWNZmxOvDUJa9HcMwc3MamgzZdxnp41BawL6Vkwq1SzwCcqIBaM
-1kVaUYvGsAGl4H5xB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abpfeHK94dYubk3RmA99NadN1pNvE4
-pOzC6rgBJ/nExeALjXM+bmhdeI6vqCpx99H5xGzV6BpSZAyRk07vT5HyhX4sYl/O
-xieMAAAAAAAA
+EwtOU1MgVGVzdCBDQQIBHjANBgkqhkiG9w0BAQEFAASCAQACHJp95tWVz8ZizLJw
+jIAbYT3GeEZoUOG0wYqDUN66m+M+HMRHN8xAfGkn2DapLsvRl2xhJkWMpN1tXKb5
+w5zaILltG6GuU2GK8n4Qbjs2I4NiVxJhhEsgUv9HzK80EJnAXKtxsLIvHIARrJI/
+l9pjfxcx68iLLZPAI7uTzvK9O8oExrkNlRZBlFw93kmkbYegaLeIL8hIkxg++vdb
+98b/dZE3Y4xcfa4X59QTj/5yN7zP16LJfMg6qy0uz8S4Aja9gJKwxLeS9VKl9xxk
+dcVHh9I6ySvBEbSPCp0mEuDkC6oPMecGT9PNp+hpvVjOZscvAa01WxYMGvni0uwR
+CGAWAAAAAAAA
 --------------ms030903020902020502030404--
 
--- a/mailnews/test/data/smime/alice.dsig.SHA1.multipart.env.eml
+++ b/mailnews/test/data/smime/alice.dsig.SHA1.multipart.env.eml
@@ -1,82 +1,82 @@
 MIME-Version: 1.0
 From: Alice@example.com
 To: Bob@example.com
-Subject: enveloped clear-signed sig.SHA1
+Subject: clear-signed then enveloped sig.SHA1
 Content-Type: application/pkcs7-mime; name=smime.p7m;
     smime-type=enveloped-data
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename=smime.p7m
 Content-Description: S/MIME Encrypted Message
 
 MIAGCSqGSIb3DQEHA6CAMIACAQAxggGFMIIBgQIBADBpMGQxCzAJBgNVBAYTAlVT
 MRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIw
 EAYDVQQKEwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBAgEoMA0GCSqG
-SIb3DQEBAQUABIIBAL5T+Kbx7ZOdCxBlCbuyE0x4DkQ4m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8SByasQAcsp0henRlRl6dB3E8uErCionH9BUQSuSGQh81X7uR8E
+BLOUWVj/pZcWjvmXab2fuKmmmEXciTwBBi1GvUtQBykS0fw6kyTKTd11c6R4vcOa
+V62aw/aopIw7Djg6ZmQ4jFoZgbUaiyBmcyxNsQxaDdUFlkcCE0tkhnVvU7LwX907
+ZrJqkSCfCHP5QVQyF/TqocGDIolKHI63YFTwrjM9E8U7HvVD3KQnMyJn8dESWzQE
+EBC5JdBUY+twZm7b4lgAiUUAAAAAAAAAAAAA
 
--- a/mailnews/test/data/smime/alice.dsig.SHA1.multipart.mismatch-econtent.eml
+++ b/mailnews/test/data/smime/alice.dsig.SHA1.multipart.mismatch-econtent.eml
@@ -19,41 +19,41 @@ Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename=smime.p7s
 Content-Description: S/MIME Cryptographic Signature
 
 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAaCA
 JIAER0NvbnRlbnQtVHlwZTogdGV4dC9wbGFpbg0KDQpUaGlzIGlzIGEgdGVzdCBt
 ZXNzYWdlIGZyb20gQWxpY2UgdG8gQm9iLg0KAAAAAAAAoIIDYjCCA14wggJGoAMC
 AQICAR4wDQYJKoZIhvcNAQELBQAwZDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNh
 bGlmb3JuaWExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxEjAQBgNVBAoTCUJPR1VT
-IE5TUzEUMBIGA1UEAxMLTlNTIFRlc3QgQ0EwHhcNMTkwNzAzMTczMDA3WhcNMjQw
-NzAzMTczMDA3WjCBgDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWEx
+IE5TUzEUMBIGA1UEAxMLTlNTIFRlc3QgQ0EwHhcNMTkwNzAzMTgxMDE0WhcNMjQw
+NzAzMTgxMDE0WjCBgDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWEx
 FjAUBg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0IENBAgEeMHoGCyqGSIb3DQEJEAILMWugaTBkMQswCQYD
 VQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4g
 VmlldzESMBAGA1UEChMJQk9HVVMgTlNTMRQwEgYDVQQDEwtOU1MgVGVzdCBDQQIB
-HjANBgkqhkiG9w0BAQEFAASCAQA3Ola6Yh8cBgYxColrYgWEVCRuAfcPDc+iX7EK
-5R5WDLEJL/6nLXTn8bi7ysnDUmeocPtyzxXh6vSx30D45WbsuYV1qZbXJGfe3xgM
-yGaYI99VRe2kuduA6rqNstg8MEpyjSTd0pQVekKdQLVWRoOF+7s8v32m4m1noGu6
-jHAsXcbb00Ck1WciSjOswXFCR6xm1o2nAQwzMpMSjclbXvi0epLOJpU2ww7mLG45
-LGMIV4SYMhP0v6sL/UUpmth4piL7OmhEfzXOvmKRxhaHkREdHJK1LUoCjLZ616Uo
-ZhbZrJSMf9uyftdsJXjML++R9Xh22MOqwP1FkejdiLNzqbXJAAAAAAAA
+HjANBgkqhkiG9w0BAQEFAASCAQBpRHBRQNJYMMGDVNUuImpFhRB5MmRKGTXjxe0s
+5cAHYmiZ68xMx/GojvBIL3wUiLqP9zjirO0MVaU1p34g+yUuCh1rCHK+qtnJjnFz
+MJrEV93iSmxzkWn5i3ZarWwYpZ/SU7fDncfTIFIDjhK2IQ44uBaon6OhyUCBSIvE
+d+h6CNOAtN2ZsYEE4FmeZkb6gZv0HL8LYsK8U5rCz+kt8LIUstQowe6PHMPG/qmy
+m239TCD4EkFJYnNhrO2GgZ1T0Kq8AC1B5B4w8FVtnxO7bgs3L4O7Ma305OFD1Ly9
+B4/9He7Cho9tpOr2GMTdBpHix8zu1KAuPTI6Pl0DqkDI/ABHAAAAAAAA
 --------------ms030903020902020502030404--
 
--- a/mailnews/test/data/smime/alice.dsig.SHA256.multipart.bad.eml
+++ b/mailnews/test/data/smime/alice.dsig.SHA256.multipart.bad.eml
@@ -18,41 +18,41 @@ Content-Type: application/pkcs7-signatur
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename=smime.p7s
 Content-Description: S/MIME Cryptographic Signature
 
 MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0B
 BwEAAKCCA2IwggNeMIICRqADAgECAgEeMA0GCSqGSIb3DQEBCwUAMGQxCzAJBgNV
 BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBW
 aWV3MRIwEAYDVQQKEwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBMB4X
-DTE5MDcwMzE3MzAwN1oXDTI0MDcwMzE3MzAwN1owgYAxCzAJBgNVBAYTAlVTMRMw
+DTE5MDcwMzE4MTAxNFoXDTI0MDcwMzE4MTAxNFowgYAxCzAJBgNVBAYTAlVTMRMw
 EQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYD
 VQQKEwlCT0dVUyBOU1MxIDAeBgkqhkiG9w0BCQEWEUFsaWNlQGV4YW1wbGUuY29t
 MQ4wDAYDVQQDEwVBbGljZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
-AOBfD2Up3UqD4VDDHVVPHCFalj8dR4PjlGc305O73/HZ8DliaraE+jvuRX+N9pD2
-yHYyJt5u0nqNHgQtbNVtM9pGM7T5FQs0pQHzIP+WxKZD4FUlkI59i8bGLgx0c66/
-0J8FIPmXcCBabNvT3CvFxUHmijXP65uFGIUU2d+IhFEH+0EFUkGWsT2Qrp8Y/qpP
-k9SmiCnfygiyV/YRV8m2xjOU09AWsUGoXbZbOGlJ8ppoaKkN3yScESAei7Yf5tUz
-7yhOV4+m6Ir2NANAxoRVjWZsTrw1CWvR3DMHNzGpoM2XcZ6eNQWsC+lZMKtUs8An
-KiAWjNZFWlGLxrABpeB+cQcCAwEAATANBgkqhkiG9w0BAQsFAAOCAQ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vFJGcfqtP6IzDgIMdg4Tw6IH2Gj0AAAAAAAA=
+AQUABIIBABy9dVtmh8/te0YX6A5n9Os56+SQkltJWz5ohHroIKvCgbOs0ZW8ELLO
+XJbbExDPK3/OY7bBLIWPjZOlntNL8hA6ySolBOj90ZiFK2+p07pquEpO+0FOQAwD
+PmKWAqXaDrEDWJpRc2O15UG6bCl1vpdY8xVP6ezE2HCD91nmX4La8uyvGW9RhQQT
+minj/vg+4JK21V5+Q3uqxRumNl6z0UctUPD9kdyUnpBkuEk674SxwaKN+z8b0J6D
+BBWoeLoo/DQqbYl+JsvRWcrP3Zw0FftbErmY4UFuzMnrlxpH4/TLWKzFs7WpX1co
+lOWDCne0R3Bgx8xZOH2jGfkkm3O424IAAAAAAAA=
 --------------ms030903020902020502030404--
 
--- a/mailnews/test/data/smime/alice.dsig.SHA256.multipart.eml
+++ b/mailnews/test/data/smime/alice.dsig.SHA256.multipart.eml
@@ -18,41 +18,41 @@ Content-Type: application/pkcs7-signatur
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename=smime.p7s
 Content-Description: S/MIME Cryptographic Signature
 
 MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0B
 BwEAAKCCA2IwggNeMIICRqADAgECAgEeMA0GCSqGSIb3DQEBCwUAMGQxCzAJBgNV
 BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBW
 aWV3MRIwEAYDVQQKEwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBMB4X
-DTE5MDcwMzE3MzAwN1oXDTI0MDcwMzE3MzAwN1owgYAxCzAJBgNVBAYTAlVTMRMw
+DTE5MDcwMzE4MTAxNFoXDTI0MDcwMzE4MTAxNFowgYAxCzAJBgNVBAYTAlVTMRMw
 EQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYD
 V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QAgsxa6BpMGQxCzAJBgNVBAYTAlVTMRMwEQYD
 VQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYDVQQK
 EwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBAgEeMA0GCSqGSIb3DQEB
-AQUABIIBAD8R/CfmwG3HaluS10rh7iqhaWNmC/JO/UvQ6zOf+2ekKB28vR1rRaud
-NOZzE+E6eoT8SKgC9sK2wa7Ywr2+YFrqjVQj7Oo0OJ6uzkId+2jeA1ROyJZGFvPI
-gT6RfTCSLje006GxQmXdxM0FnC+BcIGCFF/AmIAu4oOWx1Yh6ZkIqgiCrN8OeqRn
-lVmaG0TBFivJ5mHXNuPQ8M1xi4uB8QRaTbThTq22hZWoHuCQLHt0zwjkAqg4JZUQ
-skg7YwB8Vff7uzrcZnlzJVjYPObdlJSV9LE4LiRiiCeBIqiv1Xd2fRicRuMp17xS
-MdQvFJGcfqtP6IzDgIMdg4Tw6IH2Gj0AAAAAAAA=
+AQUABIIBABy9dVtmh8/te0YX6A5n9Os56+SQkltJWz5ohHroIKvCgbOs0ZW8ELLO
+XJbbExDPK3/OY7bBLIWPjZOlntNL8hA6ySolBOj90ZiFK2+p07pquEpO+0FOQAwD
+PmKWAqXaDrEDWJpRc2O15UG6bCl1vpdY8xVP6ezE2HCD91nmX4La8uyvGW9RhQQT
+minj/vg+4JK21V5+Q3uqxRumNl6z0UctUPD9kdyUnpBkuEk674SxwaKN+z8b0J6D
+BBWoeLoo/DQqbYl+JsvRWcrP3Zw0FftbErmY4UFuzMnrlxpH4/TLWKzFs7WpX1co
+lOWDCne0R3Bgx8xZOH2jGfkkm3O424IAAAAAAAA=
 --------------ms030903020902020502030404--
 
--- a/mailnews/test/data/smime/alice.dsig.SHA256.multipart.env.eml
+++ b/mailnews/test/data/smime/alice.dsig.SHA256.multipart.env.eml
@@ -1,83 +1,83 @@
 MIME-Version: 1.0
 From: Alice@example.com
 To: Bob@example.com
-Subject: enveloped clear-signed sig.SHA256
+Subject: clear-signed then enveloped sig.SHA256
 Content-Type: application/pkcs7-mime; name=smime.p7m;
     smime-type=enveloped-data
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename=smime.p7m
 Content-Description: S/MIME Encrypted Message
 
 MIAGCSqGSIb3DQEHA6CAMIACAQAxggGFMIIBgQIBADBpMGQxCzAJBgNVBAYTAlVT
 MRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIw
 EAYDVQQKEwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBAgEoMA0GCSqG
-SIb3DQEBAQUABIIBAI6VGG/ERqu5rmqYwJR6YvAsl94nFqgNCE+I5ZXbBIVFME7c
-LqnYW0Mw4sqWHJBXTHcQ6nWGX/LJSyZHUD2Unpl7F28hoKZ2UvUXMERyu3Qn5DpA
-1JnueDV5bi9P6yc/2W8hMlRTLA3y+OY5b7C3c9iYxvmCE8bOucgngr+ZvJTXFD87
-RmWB+12KIQoNwPtn2jY04pkhdov93J5aRdmeQAHwlb2iZ57AWqQRHXNtNKvQwRPh
-t635pgM3gFbKSat8/Qd77Y9j/DNUDZfuryj5wuzo63UkJX0/Vt/y6I9d5yOG8YYB
-iyXgQQiTNI+VasUUJR9tTvmk6+Q+FQd+vQ2BrxowgAYJKoZIhvcNAQcBMB0GCWCG
-SAFlAwQBAgQQisDm6ubELh3s5iCP068Ba6CABIILcLZdiuH1Ig9MzT7FUBUfazpT
-1PbTv1oQZ7EkRR9JRArH8MDyN5gfXfrB7DtbCiDcbxmgwz+CwC7TPAuje3W1jHM2
-4NS+2p9D1QWVWKnvVsFt1gTCIKvXv2IL20wdkD9BV/YgaKuDYbITAopxavhFSgLV
-MhvqnDii5DBG1jjaHiZbwq+ONAuMTBhjA0zNlb41bFOFm4BQp3qg1DSmvGfnCdVA
-xy6WvXeD+PTxruJJzitxvJRSotJt9+AonveAOFo06BDXbhom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yJLQKJO5pjjjPT/JgoEb386Ih0GhN3VbscfyIQNvQBKPOw
+5r7o4jtCyB64j2iEgLhI8ltbp470tGXOA1KCamPIBbaiwDl0XZ6LNjZcrSEgIfcV
+3iSZ869av2IyAsJ8kKT93PfH1069Jc4N1jJv1X2/02YNG6XrkkcpHgPiGf/dDSu+
+REI4YKTYw/1bgJYvOYWQ4BEXeQD+aG+09NAa1u/stkmob0luTINdcCIdysrtLslG
+5JWPFpkzjuzODjJuB7cur/+1bSiuehmt+LXPRBScy0NXSEfa1yAFEEXSh/8D4q/n
+DuSpA4az/nzCyBjsQOABJ0/XSOl740i+mxsmQqS8+VCrLF0JMDN9LA9fDKeWDKTj
+oy9Eyel9QdMhFfUsEvESoUkrBihUN5RfCiYdzQ/NrR62ZiiA0hs5Cv9goZONLNhN
+52Z7kPswyrT1srYDa2d96IXKf91rbD2e1tjUPsnPzvxxWSog/1b9ljrpyaQQglCk
+W7w2rPuI+d2vwYq3fD2K74AlzUnNcqh+ICmLxI17v+Pjxo1IdqGtqekj1sCSg384
+U3inuGg4SFCrgFdabexfzE5iVuO5CYZzdGqkth6h/HW3PliOpgYxhrDzBn9RxiHU
+Ny8u/ywnDCj+yQGFuWW3SNyQKjTECj0OrdHxK0K7edRIy2iovFvr194sD57Bvgi4
+j2GTpXe9sQ+FewaHRqm/esZHkrYV3lSRdrriufKJdgQQp5c4haEUnqQac5C4uyQ9
+DQAAAAAAAAAAAAA=
 
--- a/mailnews/test/data/smime/alice.dsig.SHA256.multipart.mismatch-econtent.eml
+++ b/mailnews/test/data/smime/alice.dsig.SHA256.multipart.mismatch-econtent.eml
@@ -19,42 +19,42 @@ Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename=smime.p7s
 Content-Description: S/MIME Cryptographic Signature
 
 MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0B
 BwGggCSABEdDb250ZW50LVR5cGU6IHRleHQvcGxhaW4NCg0KVGhpcyBp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7erSDAkAAAAAAAA=
+BgNVBAMTC05TUyBUZXN0IENBAgEeMA0GCSqGSIb3DQEBAQUABIIBAGRgN/AnK/ji
+nZjcaB7ELVup/2H3q70q/AH3BLDmXNbpQkUmqKOcevzDyI/YBQS5TtwEEGannMf+
+++kWdcyS7EUamynWdxI/HoaBOk37up4vjtMMepCT1GlYPjXGADDSjw/XzJQHb1LP
+e6gN4ejHJOtFutZ2NNf2QIWuXQRDV6XATAksy5hG7HZqxZuJM1SKCv89UmS8yX6n
+K30F6Bnh3DglD2/0SBVjhMBo2OWj7mGdfOLZGBjIJjRSlLMlrkF8aq8oaDR2tHDB
+a1Zptn8tCfYTk0SP25O5rVlZ3Nf3dKZeRGzoLVSvRmo4QRBlDQUPmejobqGV1dCZ
+XQcXntWTaykAAAAAAAA=
 --------------ms030903020902020502030404--
 
--- a/mailnews/test/data/smime/alice.dsig.SHA384.multipart.bad.eml
+++ b/mailnews/test/data/smime/alice.dsig.SHA384.multipart.bad.eml
@@ -18,41 +18,41 @@ Content-Type: application/pkcs7-signatur
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename=smime.p7s
 Content-Description: S/MIME Cryptographic Signature
 
 MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgIFADCABgkqhkiG9w0B
 BwEAAKCCA2IwggNeMIICRqADAgECAgEeMA0GCSqGSIb3DQEBCwUAMGQxCzAJBgNV
 BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBW
 aWV3MRIwEAYDVQQKEwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBMB4X
-DTE5MDcwMzE3MzAwN1oXDTI0MDcwMzE3MzAwN1owgYAxCzAJBgNVBAYTAlVTMRMw
+DTE5MDcwMzE4MTAxNFoXDTI0MDcwMzE4MTAxNFowgYAxCzAJBgNVBAYTAlVTMRMw
 EQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHE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mx
 FDASBgNVBAMTC05TUyBUZXN0IENBAgEeMHoGCyqGSIb3DQEJEAILMWugaTBkMQsw
 CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRh
 aW4gVmlldzESMBAGA1UEChMJQk9HVVMgTlNTMRQwEgYDVQQDEwtOU1MgVGVzdCBD
-QQIBHjANBgkqhkiG9w0BAQEFAASCAQBQN10JIbN5LfL6a6pRD574/fzGh0/ssmvM
-YVio8jwZs6ayh0LDT3QaH8PeyNf1RWM1fTRQ9wzbiv4HL2xjVk/fscrjojertRxm
-n3s3jxorDAbpNMcAyaVLf41KZ8BGih/gNUAqEReLq+5thl6rspNSiO/joWNUUZQj
-ATXS33g+A4Vm9/SxvBxA5STyRUJ+VSMhh0o5FcZSQgnjHH18F1lcma5+Xx2Il/6p
-K3oqBb6azXMdGEdZtmXu8r1hTWPuBNGI64wAiBhRdbk2c54oft0hmw7JzZKIxSoY
-Zk4FW8nUwJr+AFAGXHVOWpVN0tn8L1k4DHoEgFez/O1DlnHxu4oEAAAAAAAA
+QQIBHjANBgkqhkiG9w0BAQEFAASCAQCW2wZREwFWCJSl58PLDlH+74mYA0+gvgdt
+MK715v99I1Ab5lU5Lrf65r4xDpKVVMwAQjvmqn+Ozk4YycD+AOrpoaETXz+fFlA6
+UsH6n1Ki7x2k6O/HklNWq6Ieye3kOMGNlFbA6m/oSxs2Ht/0fAjpU3oUIi/+qD6z
+K75VHiMYaDxr2VakpzQ9liq7O5pgiXqKDi6ImPuqpfB6SFEPEt4MEpPXZl8FFBTn
+hhbOJBWnFA73Y8GSSbYl1iydp2OWm1Dbz8nprvuCeQoWu99cp37ms8BlLwXn9lZK
+3ogtEy4RFnfKzI2FPb9Za5Wd4rxYbZxU32Kzv0Q3fc8kodaaJ6f4AAAAAAAA
 --------------ms030903020902020502030404--
 
--- a/mailnews/test/data/smime/alice.dsig.SHA384.multipart.eml
+++ b/mailnews/test/data/smime/alice.dsig.SHA384.multipart.eml
@@ -18,41 +18,41 @@ Content-Type: application/pkcs7-signatur
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename=smime.p7s
 Content-Description: S/MIME Cryptographic Signature
 
 MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgIFADCABgkqhkiG9w0B
 BwEAAKCCA2IwggNeMIICRqADAgECAgEeMA0GCSqGSIb3DQEBCwUAMGQxCzAJBgNV
 BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBW
 aWV3MRIwEAYDVQQKEwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBMB4X
-DTE5MDcwMzE3MzAwN1oXDTI0MDcwMzE3MzAwN1owgYAxCzAJBgNVBAYTAlVTMRMw
+DTE5MDcwMzE4MTAxNFoXDTI0MDcwMzE4MTAxNFowgYAxCzAJBgNVBAYTAlVTMRMw
 EQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYD
 VQQKEwlCT0dVUyBOU1MxIDAeBgkqhkiG9w0BCQEWEUFsaWNlQGV4YW1wbGUuY29t
 MQ4wDAYDVQQDEwVBbGljZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
-AOBfD2Up3UqD4VDDHVVPHCFalj8dR4PjlGc305O73/HZ8DliaraE+jvuRX+N9pD2
-yHYyJt5u0nqNHgQtbNVtM9pGM7T5FQs0pQHzIP+WxKZD4FUlkI59i8bGLgx0c66/
-0J8FIPmXcCBabNvT3CvFxUHmijXP65uFGIUU2d+IhFEH+0EFUkGWsT2Qrp8Y/qpP
-k9SmiCnfygiyV/YRV8m2xjOU09AWsUGoXbZbOGlJ8ppoaKkN3yScESAei7Yf5tUz
-7yhOV4+m6Ir2NANAxoRVjWZsTrw1CWvR3DMHNzGpoM2XcZ6eNQWsC+lZMKtUs8An
-KiAWjNZFWlGLxrABpeB+cQcCA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oY
-Zk4FW8nUwJr+AFAGXHVOWpVN0tn8L1k4DHoEgFez/O1DlnHxu4oEAAAAAAAA
+QQIBHjANBgkqhkiG9w0BAQEFAASCAQCW2wZREwFWCJSl58PLDlH+74mYA0+gvgdt
+MK715v99I1Ab5lU5Lrf65r4xDpKVVMwAQjvmqn+Ozk4YycD+AOrpoaETXz+fFlA6
+UsH6n1Ki7x2k6O/HklNWq6Ieye3kOMGNlFbA6m/oSxs2Ht/0fAjpU3oUIi/+qD6z
+K75VHiMYaDxr2VakpzQ9liq7O5pgiXqKDi6ImPuqpfB6SFEPEt4MEpPXZl8FFBTn
+hhbOJBWnFA73Y8GSSbYl1iydp2OWm1Dbz8nprvuCeQoWu99cp37ms8BlLwXn9lZK
+3ogtEy4RFnfKzI2FPb9Za5Wd4rxYbZxU32Kzv0Q3fc8kodaaJ6f4AAAAAAAA
 --------------ms030903020902020502030404--
 
--- a/mailnews/test/data/smime/alice.dsig.SHA384.multipart.env.eml
+++ b/mailnews/test/data/smime/alice.dsig.SHA384.multipart.env.eml
@@ -1,83 +1,83 @@
 MIME-Version: 1.0
 From: Alice@example.com
 To: Bob@example.com
-Subject: enveloped clear-signed sig.SHA384
+Subject: clear-signed then enveloped sig.SHA384
 Content-Type: application/pkcs7-mime; name=smime.p7m;
     smime-type=enveloped-data
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename=smime.p7m
 Content-Description: S/MIME Encrypted Message
 
 MIAGCSqGSIb3DQEHA6CAMIACAQAxggGFMIIBgQIBADBpMGQxCzAJBgNVBAYTAlVT
 MRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIw
 EAYDVQQKEwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBAgEoMA0GCSqG
-SIb3DQEBAQUABIIBAHdVoTfKqWL6LmAmNEsdeUADTIT7DW7cQdlMUuu4PTQufeeM
-5/X8tG1MJK+ZtXy6wnJUbA/jyv/18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q6rdMv2Zrp4Unt1OtsBRh6fpoWdlo2xuuoXtlUL9CcBGq2EQrFef2+yWc/fb
+OrlmxIccHBh5shF9qjomIHIW/x8vT2M18qt05nG56VX+YUfa8zybpBs+MHn2fAf1
+M2QbVQPBuAcYCdVtHPhB3zB8DEuHdR/wOvD+G27bldy1RCRQhdjF3ttiZcsAuiTn
+78235qrYnCle/jwgUSMF+iKVgzlJBf3u9nnBnKdUP9++PBy7tBubah7cYDvo9b1G
+MVeqyj+bEfY81ht2Jvw6twL9ruAvEqToYcxKU4sb1QfH9m7XKTVN59OXiSF+BGVl
+hh8EtdBkQpKfXSesmJoadhi27d8yDp3Tk/UminyrsGgi55A1xXcS2GPgjRGQJGqd
+U712Ll7+3dl0TmMWNNbTBBAqJYpKcQeal53X/miMNmJDAAAAAAAAAAAAAA==
 
--- a/mailnews/test/data/smime/alice.dsig.SHA384.multipart.mismatch-econtent.eml
+++ b/mailnews/test/data/smime/alice.dsig.SHA384.multipart.mismatch-econtent.eml
@@ -19,42 +19,42 @@ Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename=smime.p7s
 Content-Description: S/MIME Cryptographic Signature
 
 MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgIFADCABgkqhkiG9w0B
 BwGggCSABEdDb250ZW50LVR5cGU6IHRleHQvcGxhaW4NCg0KVGhpcyBpcyBhIHRl
 c3QgbWVzc2FnZSBmcm9tIEFsaWNlIHRvIEJvYi4NCgAAAAAAAKCCA2IwggNeMIIC
 RqADAgECAgEeMA0GCSqGSIb3DQEBCwUAMGQxCzAJBgNVBAYTAlVTMRMwEQYDVQQI
 EwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYDVQQKEwlC
-T0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBMB4XDTE5MDcwMzE3MzAwN1oX
-DTI0MDcwMzE3MzAwN1owgYAxCzAJBgNVBAYTAlVTMRMwEQYDVQQI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7NwvBsoW9Cl9GTfJcG5
+CKEiSEGtjfxCWrAA/JjAGAkQK4tvYzCWAAAAAAAA
 --------------ms030903020902020502030404--
 
--- a/mailnews/test/data/smime/alice.dsig.SHA512.multipart.bad.eml
+++ b/mailnews/test/data/smime/alice.dsig.SHA512.multipart.bad.eml
@@ -18,42 +18,42 @@ Content-Type: application/pkcs7-signatur
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename=smime.p7s
 Content-Description: S/MIME Cryptographic Signature
 
 MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgMFADCABgkqhkiG9w0B
 BwEAAKCCA2IwggNeMIICRqADAgECAgEeMA0GCSqGSIb3DQEBCwUAMGQxCzAJBgNV
 BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBW
 aWV3MRIwEAYDVQQKEwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBMB4X
-DTE5MDcwMzE3MzAwN1oXDTI0MDcwMzE3MzAwN1owgYAxCzAJBgNVBAYTAlVTMRMw
+DTE5MDcwMzE4MTAxNFoXDTI0MDcwMzE4MTAxNFowgYAxCzAJBgNVBAYTAlVTMRMw
 EQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYD
 VQQKEwlCT0dVUyBOU1MxIDAeBgkqhkiG9w0BCQEWEUFsaWNlQGV4YW1wbGUuY29t
 MQ4wDAYDVQQDEwVBbGljZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
-AOBfD2Up3UqD4VDDHVVPHCFalj8dR4PjlGc305O73/HZ8DliaraE+jvuRX+N9pD2
-yHYyJt5u0nqNHgQtbNVtM9pGM7T5FQs0pQHzIP+WxKZD4FUlkI59i8bGLgx0c66/
-0J8FIPmXcCBabNvT3CvFxUHmijXP65uFGIUU2d+IhFEH+0EFUkGWsT2Qrp8Y/qpP
-k9Smi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AkNznPbpWqQi063X6DzulxvcJxUDfmge
-x30isoIdRSmsF8nJAj76f64OQqKYNBaZ+RLds4PvdIwHsO3tU+ZZMStqhHlXRb0O
-EHxNTUGxC8FsmthIyCUF+Uuy/EKOFEzlD6l/HbxZbg+UZMPF16d73uQdtq6CE5RS
-7HR367IHdBgph2kpGFmT7VnqnofVCmM5vBK6TU1Iyd1J5MSLBccGvi5yhQHWpFy2
-oLOutbnYBQAAAAAAAA==
+A1UEAxMLTlNTIFRlc3QgQ0ECAR4wDQYJKoZIhvcNAQEBBQAEggEAru1imurEzWeD
+CDq508rcmEricLW+t0pcBsr5HsnagnE7L8rhE2hyZvse+S0XLsRODbHW1AmHxwJ8
+QKEOy2qJTYQHpSYwx94mhRpvrEETs9jvI7xJdD6rRl2XYsYDFHUXIDkkD1eWls60
+IRVNtcfv4cMVlC/kxHeM3IrZNS2jZ5+Slx4Kn610N6c52iXuBQ8vVDkgRmca/6XI
+LfybPCPdJaQLRpDGhg21izpqBIQxTKsuyddM86bhnzXK1zH6bzJRRj6dCrMIlCWA
+2fsvlg08HZKrmlS7erekLcvsidHvim6NKcafUUxUMm7N4GOOiYBknD5kaicbA1Nf
+YcGhMGzKAgAAAAAAAA==
 --------------ms030903020902020502030404--
 
--- a/mailnews/test/data/smime/alice.dsig.SHA512.multipart.eml
+++ b/mailnews/test/data/smime/alice.dsig.SHA512.multipart.eml
@@ -18,42 +18,42 @@ Content-Type: application/pkcs7-signatur
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename=smime.p7s
 Content-Description: S/MIME Cryptographic Signature
 
 MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgMFADCABgkqhkiG9w0B
 BwEAAKCCA2IwggNeMIICRqADAgECAgEeMA0GCSqGSIb3DQEBCwUAMGQxCzAJBgNV
 BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBW
 aWV3MRIwEAYDVQQKEwlCT0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iXuBQ8vVDkgRmca/6XI
+LfybPCPdJaQLRpDGhg21izpqBIQxTKsuyddM86bhnzXK1zH6bzJRRj6dCrMIlCWA
+2fsvlg08HZKrmlS7erekLcvsidHvim6NKcafUUxUMm7N4GOOiYBknD5kaicbA1Nf
+YcGhMGzKAgAAAAAAAA==
 --------------ms030903020902020502030404--
 
--- a/mailnews/test/data/smime/alice.dsig.SHA512.multipart.env.eml
+++ b/mailnews/test/data/smime/alice.dsig.SHA512.multipart.env.eml
@@ -1,84 +1,84 @@
 MIME-Version: 1.0
 From: Alice@example.com
 To: Bob@example.com
-Subject: enveloped clear-signed sig.SHA512
+Subject: clear-signed then enveloped sig.SHA512
 Content-Type: application/pkcs7-mime; name=smime.p7m;
     smime-type=enveloped-data
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename=smime.p7m
 Content-Description: S/MIME Encrypted Message
 
 MIAGCSqGSIb3DQEHA6CAMIACAQAxggGFMIIBgQIBADBpMGQxCzAJBgNVBAYTAlVT
 MRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIw
 EAYDVQQKEwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBAgEoMA0GCSqG
-SIb3DQEBAQUABIIBAAFcnJQTKo70RqcG6V+asv2d0AKp/2eWsBR4uqZzySfqaRx+
-KYzQ4qIkdRemhy9e7GJtAHwBjGdpzjmGKNb8LnpIs1W/ZkHHO8YyV+Mk/BdWBRgd
-FuvBfY+CrB6YJGo3hKblQfLhdf0/C+keE8dPeWNwvI0YEU7tdT5xxWtKcfLRmyZh
-enLV/BjpgZJko3buP1SVi4SwSIQWqTiAiSzP2mniE/Q7kiMnP4P96RnpY1ukERYo
-ihxAIGS2KdjxLeIoOg3mFmpuMJQ/5b5KONISrlPfvuPOqQiqlDU2m2EKiwCB5VfN
-xAkksQp0HQPE/OhviA2syr6uRva+UzYQtyDIYS8wgAYJKoZIhvcNAQcBMB0GCW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SosRJmfQbnkWsUHA9OVFY+DHjJxbzKd2xD6jPiG1nLUuRGEgC8D/daZ34m9lpPn
+xDHOJYkEXzmmh42ZJ2IIrmgUJFrT88qaJycasZxQowQQYCbw8ecmvnQ4KhdHZBlJ
+/QAAAAAAAAAAAAA=
 
--- a/mailnews/test/data/smime/alice.dsig.SHA512.multipart.mismatch-econtent.eml
+++ b/mailnews/test/data/smime/alice.dsig.SHA512.multipart.mismatch-econtent.eml
@@ -19,42 +19,42 @@ Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename=smime.p7s
 Content-Description: S/MIME Cryptographic Signature
 
 MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgMFADCABgkqhkiG9w0B
 BwGggCSABEdDb250ZW50LVR5cGU6IHRleHQvcGxhaW4NCg0KVGhpcyBpcyBhIHRl
 c3QgbWVzc2FnZSBmcm9tIEFsaWNlIHRvIEJvYi4NCgAAAAAAAKCCA2IwggNeMIIC
 RqADAgECAgEeMA0GCSqGSIb3DQEBCwUAMGQxCzAJBgNVBAYTAlVTMRMwEQYDVQQI
 EwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYDVQQKEwlC
-T0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBMB4XDTE5MDcwMzE3MzAwN1oX
-DTI0MDcwMzE3MzAwN1owgYAxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9y
+T0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBMB4XDTE5MDcwMzE4MTAxNFoX
+DTI0MDcwMzE4MTAxNFowgYAxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9y
 bmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYDVQQKEwlCT0dVUyBOU1Mx
 IDAeBgkqhkiG9w0BCQEWEUFsaWNlQGV4YW1wbGUuY29tMQ4wDAYDVQQDEwVBbGlj
-ZTC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FjAUBgNVBAcTDU1vdW50
 YWluIFZpZXcxEjAQBgNVBAoTCUJPR1VTIE5TUzEUMBIGA1UEAxMLTlNTIFRlc3Qg
-Q0ECAR4wDQYJKoZIhvcNAQEBBQAEggEAoundvRYJ9fHgAVPoxq5Bsv0R0edWrSDU
-f3tFwwKG8H7hJwMWtGugVOAUfSimlM4foDwJquqTAdY6JVN798wftuWsXT54zkUS
-iB03LpslL7r+gAIa+glmhX6tmLGxIlAa5UyJUHBXoeL3+ze1EoEC+vET5MPh7FnQ
-mC9EP7ZaB1yn8z8N/v5KGzDBC2J9ARZoZ7ckon5cxfW9K69dD+ld184cKeWhPPEl
-5cspbZc2GqUCT0iyKW7M5wuovyOH4BLoSDyh9FFqKeAsyb4g5eQ3cggTZC+rqx3y
-MqxMGaXiLOqxz26zeedkvXI/ZyNeN8zBU9Zo0djCEfCE4GgDw+Kz/wAAAAAAAA==
+Q0ECAR4wDQYJKoZIhvcNAQEBBQAEggEAneEPwdFiGQ4o8gYa6w31ekmLadKI2/4s
+l8/QL+8E1nv//iiCWTZuTFkt6aimj979ZuDYC/K12PwmDbD9YhVCNT4BEDqtCtQ2
+QWfjiRIZjZ/xh0REXlEp9OC0XFQ7oLECfm4afu9jWrFnOOT7Cr+Gw2DHIXlh0coM
+KXYkGgHApsPEb0J4w6KXqL8Sf3xWgf4Fr7kUlQZS/Gj6W9H5S8X0x90jqb1wkluc
+b0FsaRxgwMhwQynsj7qFkyIauLM5ThEvQWPQZFHRmwCBf6M50XcqkhMK7E7doDc5
+kLL8II19G0lZQuUWodFvRdl9E8TY+59zvItVdxuaNvS8d8MDecSulwAAAAAAAA==
 --------------ms030903020902020502030404--
 
new file mode 100644
--- /dev/null
+++ b/mailnews/test/data/smime/alice.env.dsig.SHA1.multipart.dave.sig.SHA1.opaque.eml
@@ -0,0 +1,126 @@
+MIME-Version: 1.0
+From: Dave@example.com
+To: Bob@example.com
+Subject: enveloped then clear-signed sig.SHA1 then opaque signed by dave
+Content-Type: application/pkcs7-mime; name=smime.p7m;
+    smime-type=signed-data
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7m
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAaCA
+JIAEgg8EQ29udGVudC1UeXBlOiBtdWx0aXBhcnQvc2lnbmVkOyBwcm90b2NvbD0i
+YXBwbGljYXRpb24vcGtjczctc2lnbmF0dXJlIjsgbWljYWxnPXNoYS0xOyBib3Vu
+ZGFyeT0iLS0tLS0tLS0tLS0tbXMwMzA5MDMwMjA5MDIwMjA1MDIwMzA0MDQiCgpU
+aGlzIGlzIGEgY3J5cHRvZ3JhcGhpY2FsbHkgc2lnbmVkIG1lc3NhZ2UgaW4gTUlN
+RSBmb3JtYXQuCgotLS0tLS0tLS0tLS0tLW1zMDMwOTAzMDIwOTAyMDIwNTAyMDMw
+NDA0CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vcGtjczctbWltZTsgbmFtZT1z
+bWltZS5wN207CiAgICBzbWltZS10eXBlPWVudmVsb3BlZC1kYXRhCkNvbnRlbnQt
+VHJhbnNmZXItRW5jb2Rpbmc6IGJhc2U2NApDb250ZW50LURpc3Bvc2l0aW9uOiBh
+dHRhY2htZW50OyBmaWxlbmFtZT1zbWltZS5wN20KQ29udGVudC1EZXNjcmlwdGlv
+bjogUy9NSU1FIEVuY3J5cHRlZCBNZXNzYWdlCgpNSUFHQ1NxR1NJYjNEUUVIQTZD
+QU1JQUNBUUF4Z2dHRk1JSUJnUUlCQURCcE1HUXhDekFKQmdOVkJBWVRBbFZUCk1S
+TXdFUVlEVlFRSUV3cERZV3hwWm05eWJtbGhNUll3RkFZRFZRUUhFdzFOYjNWdWRH
+RnBiaUJXYVdWM01SSXcKRUFZRFZRUUtFd2xDVDBkVlV5Qk9VMU14RkRBU0JnTlZC
+QU1UQzA1VFV5QlVaWE4wSUVOQkFnRW9NQTBHQ1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I428zgY2Pw09LV1ijr8WPO0Bf3nDPx
+v3Gvxprot40xw5csfNJo35ZAeJBFMHG7RgPDPL7qbxMZWuNJXcplzKZ627mmP8+g
+A6JvtA/hddkiqPUhnqE5MukbdMNqjWTAJwZicKgJ8wgGaGiozFvFoYsE2RoduU3Q
++W/Eshh6pujaEAJZI6jB2Vo5BTaBCUOxG/NkMFiuN6IqhpOY2vsCD73WqRXoE4pb
+cTTwhBV74H0+eCvqmOoQlgAAAAAAAA==
+
new file mode 100644
--- /dev/null
+++ b/mailnews/test/data/smime/alice.env.dsig.SHA1.multipart.eml
@@ -0,0 +1,74 @@
+MIME-Version: 1.0
+From: Alice@example.com
+To: Bob@example.com
+Subject: enveloped then clear-signed sig.SHA1
+Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-1; boundary="------------ms030903020902020502030404"
+
+This is a cryptographically signed message in MIME format.
+
+--------------ms030903020902020502030404
+Content-Type: application/pkcs7-mime; name=smime.p7m;
+    smime-type=enveloped-data
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7m
+Content-Description: S/MIME Encrypted Message
+
+MIAGCSqGSIb3DQEHA6CAMIACAQAxggGFMIIBgQIBADBpMGQxCzAJBgNVBAYTAlVT
+MRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIw
+EAYDVQQKEwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBAgEoMA0GCSqG
+SIb3DQEBAQUABIIBAGgZHxKKXrR3tMqJkkADZoYNqIJJXOXmrmXHHV830/RUW6gU
+V3NNwsnl4L99kygitGe4X4gnjqPHs0FNxEL1DfxwyySfkcQge5BktBcBk448TUzz
+WrS19L4UAfJkalu+stezAO0L4hs/kYaSrvFhuQ6vxfixHxGydwX008Ps16aua5zI
+EYgiSoXxAUajtEh6phqAcC+FMhObZyEZXQKSgs3X0nYTQib8I6L7dWquYoQMVfsp
+wpERLhEqtTghEW/CT8z6gQajkEgV9tFM0f2gLSH1672LRlHVAbk4ZceBmvxa02sr
+PHW8gffMVWF6RX05rKzVnxm9IzJjHdWblc7SPJowgAYJKoZIhvcNAQcBMB0GCWCG
+SAFlAwQBAgQQSSldfdzyN/cUjHJO2EXrGKCABIGglkOJOh25hjmvYeJtxlyih1CC
+1tlMGVnct6Zuiy1y7jVIsJRSRFXsA4TQyFICPe4aq7ArNzT0Bizj8mzDXmJQNh5v
+5bwmMwMrvW5p9NMasuFIaIqbvmVnLC5c/DcJoplx1eOG0OOfXevGLrepLzF9Yeya
+TFli/xvLNSwTA+xSsFCxets7vknAXFBSqnRQP2fk2bnihfHdBh6JYIFKWStJlwQQ
+Y0jCR94CgCHcP6Yi/0bwKQAAAAAAAAAAAAA=
+
+
+--------------ms030903020902020502030404
+Content-Type: application/pkcs7-signature; name=smime.p7s
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7s
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAA
+oIIDYjCCA14wggJGoAMCAQICAR4wDQYJKoZIhvcNAQELBQAwZDELMAkGA1UEBhMC
+VVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcx
+EjAQBgNVBAoTCUJPR1VTIE5TUzEUMBIGA1UEAxMLTlNTIFRlc3QgQ0EwHhcNMTkw
+NzAzMTgxMDE0WhcNMjQwNzAzMTgxMDE0WjCBgDELMAkGA1UEBhMCVVMxEzARBgNV
+BAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxEjAQBgNVBAoT
+CUJPR1VTIE5TUzEgMB4GCSqGSIb3DQEJARYRQWxpY2VAZXhhbXBsZS5jb20xDjAM
+BgNVBAMTBUFsaWNlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAw/eN
+E/FIfD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m9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYDVQQK
+EwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBAgEeMHoGCyqGSIb3DQEJ
+EAILMWugaTBkMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQG
+A1UEBxMNTW91bnRhaW4gVmlldzESMBAGA1UEChMJQk9HVVMgTlNTMRQwEgYDVQQD
+EwtOU1MgVGVzdCBDQQIBHjANBgkqhkiG9w0BAQEFAASCAQCBft5Ciz+PM/nkryY2
+z5qICRNop2o8u0rWTrmWNeoStBGvbZtWoFrX2C1PhSf38FjRhxPWfXRIOXbBhhPu
+Floh5fhiJv9H2G6Yj+V0VjAH4wwSIhlh8fodrZhhMSX0oLxJ9bTV3YXovSpG7s/M
+4Anx8adCZimr+mWLhFONztx/1gloM2JX4BnNbHqqkmDuSHNOcJZUYt5KScN5afPH
+yrAANGK5oIEFku3ksFEU7dDI/JAse3wk2ZxBsMAljO6R4K2Bv2t1Q3B64NtZI0JZ
+kjJJQbJxNeX4Msje+A/LfXgY7CwWLEZsUhUDy5rU6ggN6eH7DiMShKIr2bd52+mj
+xBJoAAAAAAAA
+--------------ms030903020902020502030404--
+
new file mode 100644
--- /dev/null
+++ b/mailnews/test/data/smime/alice.env.dsig.SHA256.multipart.dave.sig.SHA256.opaque.eml
@@ -0,0 +1,127 @@
+MIME-Version: 1.0
+From: Dave@example.com
+To: Bob@example.com
+Subject: enveloped then clear-signed sig.SHA256 then opaque signed by dave
+Content-Type: application/pkcs7-mime; name=smime.p7m;
+    smime-type=signed-data
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7m
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0B
+BwGggCSABIIPIkNvbnRlbnQtVHlwZTogbXVsdGlwYXJ0L3NpZ25lZDsgcHJv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sEjiTBmQ8W53tSNbU0xM4fGrD8cnk
+ZsqZ6NvC9xBKe21+ueXjyQkwVxSU+bGv02sOuwfWCnKLeiLkSC9YrkwKFdauz60V
+Mn5kmACc2vi0PNcOkZe/YfJyAAAAAAAA
+
new file mode 100644
--- /dev/null
+++ b/mailnews/test/data/smime/alice.env.dsig.SHA256.multipart.eml
@@ -0,0 +1,74 @@
+MIME-Version: 1.0
+From: Alice@example.com
+To: Bob@example.com
+Subject: enveloped then clear-signed sig.SHA256
+Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="------------ms030903020902020502030404"
+
+This is a cryptographically signed message in MIME format.
+
+--------------ms030903020902020502030404
+Content-Type: application/pkcs7-mime; name=smime.p7m;
+    smime-type=enveloped-data
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7m
+Content-Description: S/MIME Encrypted Message
+
+MIAGCSqGSIb3DQEHA6CAMIACAQAxggGFMIIBgQIBADBpMGQxCzAJBgNVBAYTAlVT
+MRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIw
+EAYDVQQKEwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBAgEoMA0GCSqG
+SIb3DQEBAQUABIIBAGgZHxKKXrR3tMqJkkADZoYNqIJJXOXmrmXHHV830/RUW6gU
+V3NNwsnl4L99kygitGe4X4gnjqPHs0FNxEL1DfxwyySfkcQge5BktBcBk448TUzz
+WrS19L4UAfJkalu+stezAO0L4hs/kYaSrvFhuQ6vxfixHxGydwX008Ps16aua5zI
+EYgiSoXxAUajtEh6phqAcC+FMhObZyEZXQKSgs3X0nYTQib8I6L7dWquYoQMVfsp
+wpERLhEqtTghEW/CT8z6gQajkEgV9tFM0f2gLSH1672LRlHVAbk4ZceBmvxa02sr
+PHW8gffMVWF6RX05rKzVnxm9IzJjHdWblc7SPJowgAYJKoZIhvcNAQcBMB0GCWCG
+SAFlAwQBAgQQSSldfdzyN/cUjHJO2EXrGKCABIGglkOJOh25hjmvYeJtxlyih1CC
+1tlMGVnct6Zuiy1y7jVIsJRSRFXsA4TQyFICPe4aq7ArNzT0Bizj8mzDXmJQNh5v
+5bwmMwMrvW5p9NMasuFIaIqbvmVnLC5c/DcJoplx1eOG0OOfXevGLrepLzF9Yeya
+TFli/xvLNSwTA+xSsFCxets7vknAXFBSqnRQP2fk2bnihfHdBh6JYIFKWStJlwQQ
+Y0jCR94CgCHcP6Yi/0bwKQAAAAAAAAAAAAA=
+
+
+--------------ms030903020902020502030404
+Content-Type: application/pkcs7-signature; name=smime.p7s
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7s
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0B
+BwEAAKCCA2IwggNeMIICRqADAgECAgEeMA0GCSqGSIb3DQEBCwUAMGQxCzAJBgNV
+BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBW
+aWV3MRIwEAYDVQQKEwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBMB4X
+DTE5MDcwMzE4MTAxNFoXDTI0MDcwMzE4MTAxNFowgYAxCzAJBgNVBAYTAlVTMRMw
+EQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYD
+VQQKEwlCT0dVUyBOU1MxIDAeBgkqhkiG9w0BCQEWEUFsaWNlQGV4YW1wbGUuY29t
+MQ4wDAYDVQQDEwVBbGljZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
+AMP3jRPxSHw+J7/Bm7Wr+Krv/hvjHPV4mhThkQK+I2SCZSbKI1SGIuFjLwnMDFVs
+TJKYlPL+il2nLSxa0w/jz47toypKI0FZ7aDe/atnB9rqjjxxocxzeCpyxlL3pLlr
+yeWP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IhvcNAQkQAgsxa6BpMGQxCzAJBgNVBAYTAlVTMRMwEQYD
+VQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYDVQQK
+EwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBAgEeMA0GCSqGSIb3DQEB
+AQUABIIBAFEkX75C6zf3dZyFh6KwAjg9GHB31d2iKVddi6D+YrI4XMa4bP4xPqCs
+eJtXsMQaNlvcz7vWZfXY95m21SXLF0eDo5ETOmexnnd1dkdeAurfQl0QHNXhJaih
+501pFPNVVHR00XXMJ8V032wmBaY6djWxY/Ayqx71luFfNzsb9ks+UPcEyK3G/j2Z
+jDU1a4RUvd29AElRJArVgDme3sKzFevC3mbdJyzM+84r0kB8ov+zsDncRuqjrbET
++RkY9Sgr2vaPZTZk0EwlgcSPiS1FXrnqOE83DQWLn5NJLWqjkgzVkxIraVebTqyH
+D+6N2Wfk/lMw1LobFsLh+sB3JlJxmGIAAAAAAAA=
+--------------ms030903020902020502030404--
+
new file mode 100644
--- /dev/null
+++ b/mailnews/test/data/smime/alice.env.dsig.SHA384.multipart.dave.sig.SHA384.opaque.eml
@@ -0,0 +1,128 @@
+MIME-Version: 1.0
+From: Dave@example.com
+To: Bob@example.com
+Subject: enveloped then clear-signed sig.SHA384 then opaque signed by dave
+Content-Type: application/pkcs7-mime; name=smime.p7m;
+    smime-type=signed-data
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7m
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgIFADCABgkqhkiG9w0B
+BwGggCSABIIPNkNvbnRlbnQtVHlwZTogbXVsdGlwYXJ0L3NpZ25lZDsgcHJvdG9j
+b2w9ImFwcGxpY2F0aW9uL3BrY3M3LXNpZ25hdHVyZSI7IG1pY2FsZz1zaGEtMzg0
+OyBib3VuZGFyeT0iLS0tLS0tLS0tLS0tbXMwMz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IRWjly8tJwFIcH2OrlIi5EaoZ6wlePWfm2o2Yd9EuL70VaGfeT0IV
+RxM11My0AAAAAAAA
+
new file mode 100644
--- /dev/null
+++ b/mailnews/test/data/smime/alice.env.dsig.SHA384.multipart.eml
@@ -0,0 +1,74 @@
+MIME-Version: 1.0
+From: Alice@example.com
+To: Bob@example.com
+Subject: enveloped then clear-signed sig.SHA384
+Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-384; boundary="------------ms030903020902020502030404"
+
+This is a cryptographically signed message in MIME format.
+
+--------------ms030903020902020502030404
+Content-Type: application/pkcs7-mime; name=smime.p7m;
+    smime-type=enveloped-data
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7m
+Content-Description: S/MIME Encrypted Message
+
+MIAGCSqGSIb3DQEHA6CAMIACAQAxggGFMIIBgQIBADBpMGQxCzAJBgNVBAYTAlVT
+MRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIw
+EAYDVQQKEwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBAgEoMA0GCSqG
+SIb3DQEBAQUABIIBAGgZHxKKXrR3tMqJkkADZoYNqIJJXOXmrmXHHV830/RUW6gU
+V3NNwsnl4L99kygitGe4X4gnjqPHs0FNxEL1DfxwyySfkcQge5BktBcBk448TUzz
+WrS19L4UAfJkalu+stezAO0L4hs/kYaSrvFhuQ6vxfixHxGydwX008Ps16aua5zI
+EYgiSoXxAUajtEh6phqAcC+FMhObZyEZXQKSgs3X0nYTQib8I6L7dWquYoQMVfsp
+wpERLhEqtTghEW/CT8z6gQajkEgV9tFM0f2gLSH1672LRlHVAbk4ZceBmvxa02sr
+PHW8gffMVWF6RX05rKzVnxm9IzJjHdWblc7SPJowgAYJKoZIhvcNAQcBMB0GCWCG
+SAFlAwQBAgQQSSldfdzyN/cUjHJO2EXrGKCABIGglkOJOh25hjmvYeJtxlyih1CC
+1tlMGVnct6Zuiy1y7jVIsJRSRFXsA4TQyFICPe4aq7ArNzT0Bizj8mzDXmJQNh5v
+5bwmMwMrvW5p9NMasuFIaIqbvmVnLC5c/DcJoplx1eOG0OOfXevGLrepLzF9Yeya
+TFli/xvLNSwTA+xSsFCxets7vknAXFBSqnRQP2fk2bnihfHdBh6JYIFKWStJlwQQ
+Y0jCR94CgCHcP6Yi/0bwKQAAAAAAAAAAAAA=
+
+
+--------------ms030903020902020502030404
+Content-Type: application/pkcs7-signature; name=smime.p7s
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7s
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgIFADCABgkqhkiG9w0B
+BwEAAKCCA2IwggNeMIICRqADAgECAgEeMA0GCSqGSIb3DQEBCwUAMGQxCzAJBgNV
+BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBW
+aWV3MRIwEAYDVQQKEwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBMB4X
+DTE5MDcwMzE4MTAxNFoXDTI0MDcwMzE4MTAxNFowgYAxCzAJBgNVBAYTAlVTMRMw
+EQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYD
+VQQKEwlCT0dVUyBOU1MxIDAeBgkqhkiG9w0BCQEWEUFsaWNlQGV4YW1wbGUuY29t
+MQ4wDAYDVQQDEwVBbGljZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
+AMP3jRPxSHw+J7/Bm7Wr+Krv/hvjHPV4mhThkQK+I2SCZSbKI1SGIuFjLwnMDFVs
+TJKYlPL+il2nLSxa0w/jz47toypKI0FZ7aDe/atnB9rqjjxxocxzeCpyxlL3pLlr
+yeWPSxAooBUhY3PG8f48znu819rs+0MMLekuvh3VFgTw2B7CeidQPufFcmLzjJWo
+EEeiJ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A1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRh
+aW4gVmlldzESMBAGA1UEChMJQk9HVVMgTlNTMRQwEgYDVQQDEwtOU1MgVGVzdCBD
+QQIBHjANBgkqhkiG9w0BAQEFAASCAQAdQKzy0z9fjs9m5Y/E8V6y48dsAHf3YPcS
+e5VLZ8AzXxgA3tVuTRQKnB26XNRsHyoAKauyUOV5D0JEr+GiEf8K1dDY7Wv4jABY
+rsWhEhpGWbZNLojIMLz8A/pAsN30teeK+IczqeOL+8PG+aYAPBkAQRY7HA5VRKyE
+nv70wCsaZ/vtOh9/of20wr1Vz6lWIwq3DvVoqjO4p9Ag+LvDx3bWhZbffRX8dQoB
+srcux1wkBEHr45D86vf5HwKmpTjQUlh+QdZQP6eP+aGw9vciRbgvuL+3NJUnWDQu
++LDk0ZFPZBlRsOvD2jjQBXF0Al18IWQib1/K6UcCH12pu8hPWU4hAAAAAAAA
+--------------ms030903020902020502030404--
+
new file mode 100644
--- /dev/null
+++ b/mailnews/test/data/smime/alice.env.dsig.SHA512.multipart.dave.sig.SHA512.opaque.eml
@@ -0,0 +1,129 @@
+MIME-Version: 1.0
+From: Dave@example.com
+To: Bob@example.com
+Subject: enveloped then clear-signed sig.SHA512 then opaque signed by dave
+Content-Type: application/pkcs7-mime; name=smime.p7m;
+    smime-type=signed-data
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7m
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgMFADCABgkqhkiG9w0B
+BwGggCSABIIPT0NvbnRlbnQtVHlwZTogbXVsdGlwYXJ0L3NpZ25lZDsgcHJvdG9j
+b2w9ImFwcGxpY2F0aW9uL3BrY3M3LXNpZ25hdHVyZSI7IG1pY2FsZz1zaGEtNTEy
+OyBib3VuZGFyeT0iLS0tLS0tLS0tLS0tbXMwMzA5MDMwMjA5MDIwMjA1MDIwMzA0
+MDQiCgpUaGl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+/FRvF9pRu1cjaVey8daYDFuk2yIbrbcriZ+BvAhhrd774dZ9kJORfswv63MlazQA
+AAAAAAA=
+
new file mode 100644
--- /dev/null
+++ b/mailnews/test/data/smime/alice.env.dsig.SHA512.multipart.eml
@@ -0,0 +1,75 @@
+MIME-Version: 1.0
+From: Alice@example.com
+To: Bob@example.com
+Subject: enveloped then clear-signed sig.SHA512
+Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-512; boundary="------------ms030903020902020502030404"
+
+This is a cryptographically signed message in MIME format.
+
+--------------ms030903020902020502030404
+Content-Type: application/pkcs7-mime; name=smime.p7m;
+    smime-type=enveloped-data
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7m
+Content-Description: S/MIME Encrypted Message
+
+MIAGCSqGSIb3DQEHA6CAMIACAQAxggGFMIIBgQIBADBpMGQxCzAJBgNVBAYTAlVT
+MRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIw
+EAYDVQQKEwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBAgEoMA0GCSqG
+SIb3DQEBAQUABIIBAGgZHxKKXrR3tMqJkkADZoYNqIJJXOXmrmXHHV830/RUW6gU
+V3NNwsnl4L99kygitGe4X4gnjqPHs0FNxEL1DfxwyySfkcQge5BktBcBk448TUzz
+WrS19L4UAfJkalu+stezAO0L4hs/kYaSrvFhuQ6vxfixHxGydwX008Ps16aua5zI
+EYgiSoXxAUajtEh6phqAcC+FMhObZyEZXQKSgs3X0nYTQib8I6L7dWquYoQMVfsp
+wpERLhEqtTghEW/CT8z6gQajkEgV9tFM0f2gLSH1672LRlHVAbk4ZceBmvxa02sr
+PHW8gffMVWF6RX05rKzVnxm9IzJjHdWblc7SPJowgAYJKoZIhvcNAQcBMB0GCWCG
+SAFlAwQBAgQQSSldfdzyN/cUjHJO2EXrGKCABIGglkOJOh25hjmvYeJtxlyih1CC
+1tlMGVnct6Zuiy1y7jVIsJRSRFXsA4TQyFICPe4aq7ArNzT0Bizj8mzDXmJQNh5v
+5bwmMwMrvW5p9NMasuFIaIqbvmVnLC5c/DcJoplx1eOG0OOfXevGLrepLzF9Yeya
+TFli/xvLNSwTA+xSsFCxets7vknAXFBSqnRQP2fk2bnihfHdBh6JYIFKWStJlwQQ
+Y0jCR94CgCHcP6Yi/0bwKQAAAAAAAAAAAAA=
+
+
+--------------ms030903020902020502030404
+Content-Type: application/pkcs7-signature; name=smime.p7s
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7s
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgMFADCABgkqhkiG9w0B
+BwEAAKCCA2IwggNeMIICRqADAgECAgEeMA0GCSqGSIb3DQEBCwUAMGQxCzAJBgNV
+BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBW
+aWV3MRIwEAYDVQQKEwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBMB4X
+DTE5MDcwMzE4MTAxNFoXDTI0MDcwMzE4MTAxNFowgYAxCzAJBgNVBAYTAlVTMRMw
+EQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYD
+VQQKEwlCT0dVUyBOU1MxIDAeBgkqhkiG9w0BCQEWEUFsaWNlQGV4YW1wbGUuY29t
+MQ4wDAYDVQQDEwVBbGljZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
+AMP3jRPxSHw+J7/Bm7Wr+Krv/hvjHPV4mhThkQK+I2SCZSbKI1SGIuFjLwnMDFVs
+TJKYlPL+il2nLSxa0w/jz47toypKI0FZ7aDe/atnB9rqjjxxocxzeCpyxlL3pLlr
+yeWPSxAooBUhY3PG8f48znu819rs+0MMLekuvh3VFgTw2B7CeidQPufFcmLzjJWo
+EEeiJ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kGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWEx
+FjAUBgNVBAcTDU1vdW50YWluIFZpZXcxEjAQBgNVBAoTCUJPR1VTIE5TUzEUMBIG
+A1UEAxMLTlNTIFRlc3QgQ0ECAR4wDQYJKoZIhvcNAQEBBQAEggEASQ3Wpw7KU53n
+g1lWf1aIXF0oDWOTjGQEsZtY47JXY6jKPuiP/MTJvvfo50a1G2YvBW6vFg7mMh/5
+qLElk6UOAu2g4cbGvuksEPiNAwwDguyiXjPUIfyrIa6r4TbubLTRvwpF/meyrEbS
+77GRofl/L8tXNi3gSzJKFubVAqz7Ny+bdNRYOQwyy/0v57NHrxnn1ywkhlASyMSu
+ay01dOqpWv6uMxmsZ3rtsCKO/cSvJrNvt3cnuLyPwgYgiLcLbUMaFslyDxaNUdyy
+O14fOOKUQsAdi6QEI9EF6XbsWejVRZtp1rRMUp8XXieAI+8nNiMWY4HML2FbUEr3
+TGCkiZBdqAAAAAAAAA==
+--------------ms030903020902020502030404--
+
--- a/mailnews/test/data/smime/alice.env.eml
+++ b/mailnews/test/data/smime/alice.env.eml
@@ -6,20 +6,20 @@ Content-Type: application/pkcs7-mime; na
     smime-type=enveloped-data
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename=smime.p7m
 Content-Description: S/MIME Encrypted Message
 
 MIAGCSqGSIb3DQEHA6CAMIACAQAxggGFMIIBgQIBADBpMGQxCzAJBgNVBAYTAlVT
 MRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIw
 EAYDVQQKEwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBAgEoMA0GCSqG
-SIb3DQEBAQUABIIBAF/hrNlODAcTHs3H3PvosTsDKI0gY/R332XAbJv5HHBTbh+D
-FHyMfkXV8tc6AGf4XVBrPWbsYEXubJXtPvVxKURmTclLsUNQbujxWKc5K2jpOxgm
-Op680+xy/QLmUYJbt/Jvu1hzg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mVnLC5c/DcJoplx1eOG0OOfXevGLrepLzF9Yeya
+TFli/xvLNSwTA+xSsFCxets7vknAXFBSqnRQP2fk2bnihfHdBh6JYIFKWStJlwQQ
+Y0jCR94CgCHcP6Yi/0bwKQAAAAAAAAAAAAA=
 
new file mode 100644
--- /dev/null
+++ b/mailnews/test/data/smime/alice.env.sig.SHA1.opaque.dave.sig.SHA1.opaque.eml
@@ -0,0 +1,128 @@
+MIME-Version: 1.0
+From: Dave@example.com
+To: Bob@example.com
+Subject: enveloped then opaque-signed sig.SHA1 then opaque signed by dave
+Content-Type: application/pkcs7-mime; name=smime.p7m;
+    smime-type=signed-data
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7m
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAaCA
+JIAEgg9uQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9wa2NzNy1taW1lOyBuYW1l
+PXNtaW1lLnA3bTsKICAgIHNtaW1lLXR5cGU9c2lnbmVkLWRhdGEKQ29udGVudC1U
+cmFuc2Zlci1FbmNvZGluZzogYmFzZTY0CkNvbnRlbnQtRGlzcG9zaXRpb246IGF0
+dGFjaG1lbnQ7IGZpbGVuYW1lPXNtaW1lLnA3bQpDb250ZW50LURlc2NyaXB0aW9u
+OiBTL01JTUUgQ3J5cHRvZ3JhcGhpYyBTaWduYXR1cmUKCk1JQUdDU3FHU0liM0RR
+RUhBcUNBTUlBQ0FRRXhDekFKQmdVckRnTUNHZ1VBTUlBR0NTcUdTSWIzRFFFSEFh
+Q0EKSklBRWdnUk1RMjl1ZEdWdWRDMVVlWEJsT2lCaGNIQnNhV05oZEdsdmJpOXdh
+Mk56TnkxdGFXMWxPeUJ1WVcxbApQWE50YVcxbExuQTNiVHNLSUNBZ0lITnRhVzFs
+TFhSNWNHVTlaVzUyWld4dmNHVmtMV1JoZEdFS1EyOXVkR1Z1Cm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EMRYEFLi/yJbATUoeyFg0Kj9GBSztvC15MHgGCSsGAQQBgjcQBDFr
+MGkwZDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcT
+DU1vdW50YWluIFZpZXcxEjAQBgNVBAoTCUJPR1VTIE5TUzEUMBIGA1UEAxMLTlNT
+IFRlc3QgQ0ECATIwegYLKoZIhvcNAQkQAgsxa6BpMGQxCzAJBgNVBAYTAlVTMRMw
+EQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYD
+VQQKEwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBAgEyMA0GCSqGSIb3
+DQEBAQUABIIBAARbmptI7ML4i9mHIbOTF56o+rNgOzWJ/AKJBO994ushoIpsojI5
+r1LEz1/AhV5IyMIfnpfytUDoqeG1iQaMkkylRdrs3Cs86rhDZfpsahDvPAeOH5LW
+QuyIUfLMGqLRDQkvrOnGLKpLvLcTiYCAp6bjeVTLaaL83seXBR1C/kUUrPPUTECL
+zRr8SW06n9tsF6JzavIiwzlh7/hACZ7Iu3c0js1MGxMVF6ah7tNJHYdGWFcoA8kz
+LrXWS4HIvV74C+ZdC8bgVddpqDle/szR48xCAb87FycVaBRDq22MOPjZO6SmCjO4
+bWZbTIs8xGuYE+Mg0Kok6z2oEkAg4nfnzyIAAAAAAAA=
+
new file mode 100644
--- /dev/null
+++ b/mailnews/test/data/smime/alice.env.sig.SHA1.opaque.eml
@@ -0,0 +1,69 @@
+MIME-Version: 1.0
+From: Alice@example.com
+To: Bob@example.com
+Subject: enveloped then opaque-signed sig.SHA1
+Content-Type: application/pkcs7-mime; name=smime.p7m;
+    smime-type=signed-data
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7m
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAaC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0ECAR4wegYL
+KoZIhvcNAQkQAgsxa6BpMGQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9y
+bmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYDVQQKEwlCT0dVUyBOU1Mx
+FDASBgNVBAMTC05TUyBUZXN0IENBAgEeMA0GCSqGSIb3DQEBAQUABIIBAIF+3kKL
+P48z+eSvJjbPmogJE2inajy7StZOuZY16hK0Ea9tm1agWtfYLU+FJ/fwWNGHE9Z9
+dEg5dsGGE+4WWiHl+GIm/0fYbpiP5XRWMAfjDBIiGWHx+h2tmGExJfSgvEn1tNXd
+hei9Kkbuz8zgCfHxp0JmKav6ZYuEU43O3H/WCWgzYlfgGc1seqqSYO5Ic05wllRi
+3kpJw3lp88fKsAA0YrmggQWS7eSwURTt0Mj8kCx7fCTZnEGwwCWM7pHgrYG/a3VD
+cHrg21kjQlmSMklBsnE15fgyyN74D8t9eBjsLBYsRmxSFQPLmtTqCA3p4fsOIxKE
+oivZt3nb6aPEEmgAAAAAAAA=
+
new file mode 100644
--- /dev/null
+++ b/mailnews/test/data/smime/alice.env.sig.SHA256.opaque.dave.sig.SHA256.opaque.eml
@@ -0,0 +1,129 @@
+MIME-Version: 1.0
+From: Dave@example.com
+To: Bob@example.com
+Subject: enveloped then opaque-signed sig.SHA256 then opaque signed by dave
+Content-Type: application/pkcs7-mime; name=smime.p7m;
+    smime-type=signed-data
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7m
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0B
+BwGggCSABIIPikNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vcGtjczctbWltZTsg
+bmFtZT1zbWltZS5wN207CiAgICBzbWltZS10eXBlPXNpZ25lZC1kYXRhCkNvbnRl
+bnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJhc2U2NApDb250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/qGW5ORsodb0ORqaMZqSy+VrFUyoysTZh0Ixe
+IcxEkGZGReXtrsIw2KTfqS+xCOp0TpQm8CqlTAjosWPQR8cbdYb15r/ULQVD7QNx
+ZkKlq+9pGCELDCJB72vndk6+ekPdu9+SaNgAAAAAAAA=
+
new file mode 100644
--- /dev/null
+++ b/mailnews/test/data/smime/alice.env.sig.SHA256.opaque.eml
@@ -0,0 +1,69 @@
+MIME-Version: 1.0
+From: Alice@example.com
+To: Bob@example.com
+Subject: enveloped then opaque-signed sig.SHA256
+Content-Type: application/pkcs7-mime; name=smime.p7m;
+    smime-type=signed-data
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7m
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0B
+BwGggCSABIIETENvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vcGtjczctbWltZTsg
+bmFtZT1zbWltZS5wN207CiAgICBzbWltZS10eXBlPWVudmVsb3BlZC1kYXRhCkNv
+bnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJhc2U2NApDb250ZW50LURpc3Bvc2l0
+aW9uOiBhdHRhY2htZW50OyBmaWxlbmFtZT1zbWltZS5wN20KQ29udGVudC1EZXNj
+cmlwdGlvbjogUy9NSU1FIEVuY3J5cHRlZCBNZXNzYWdlCgpNSUFHQ1NxR1NJYjNE
+UUVIQTZDQU1JQUNBUUF4Z2dHRk1JSUJnUUlCQURCcE1HUXhDekFKQmdOVkJBWVRB
+bFZUCk1STXdFUVlEVlFRSUV3cERZV3hwWm05eWJtbGhNUll3RkFZRFZRUUhFdzFO
+YjNWdWRHRnBiaUJXYVdWM01SSXcKRUFZRFZRUUtFd2xDVDBkVlV5Qk9VMU14RkRB
+U0JnTlZCQU1UQzA1VFV5QlVaWE4wSUVOQkFnRW9NQTBHQ1NxRwpTSWIzRFFFQkFR
+VUFCSUlCQUdnWkh4S0tYclIz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.env.sig.SHA384.opaque.dave.sig.SHA384.opaque.eml
@@ -0,0 +1,130 @@
+MIME-Version: 1.0
+From: Dave@example.com
+To: Bob@example.com
+Subject: enveloped then opaque-signed sig.SHA384 then opaque signed by dave
+Content-Type: application/pkcs7-mime; name=smime.p7m;
+    smime-type=signed-data
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7m
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgIFADCABgkqhkiG9w0B
+BwGggCSABIIPn0NvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vcGtjczctbWltZTsg
+bmFtZT1zbWltZS5wN207CiAgICBzbWltZS10eXBlPXNpZ25lZC1kYXRhCkNvbnRl
+bnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJhc2U2NApDb250ZW50LURpc3Bvc2l0aW9u
+OiBhdHRhY2htZW50OyBmaWxlbmFtZT1zbWltZS5wN20KQ29udGVudC1EZXNjcmlw
+dGlvbjogUy9NSU1FIENyeXB0b2dyYXBoaWMgU2lnbmF0dXJlCgpNSUFHQ1NxR1NJ
+YjNEUUVIQXFDQU1JQUNBUUV4RHpBTkJnbGdoa2dCWlFNRUFnSUZBRENBQmdrcWhr
+aUc5dzBCCkJ3R2dnQ1NBQklJRVRFTnZiblJsYm5RdFZIbHdaVG9nWVhCd2JHbGpZ
+WFJwYjI0dmNHdGpjemN0YldsdFpUc2cKYm1GdFpUMXpiV2x0WlM1d04yMDdDaUFn
+SUNCemJXbHRaUzEwZVhCbFBXVnVkbVZzYjNCbFpDMWtZWFJoQ2tOdgpiblJsYm5R
+dFZISmhibk5tWlhJdFJXNWpiMlJwYm1jNklHSmhjMlUyTkFwRGIyNTBaVzUwTFVS
+cGMzQnZjMmwwCmFXOXVPaUJoZEhSaFkyaHRaVzUwT3lCbWFXeGxibUZ0WlQxemJX
+bHRaUzV3TjIwS1EyOXVkR1Z1ZEMxRVpYTmoKY21sd2RHbH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AlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBW
+aWV3MRIwEAYDVQQKEwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBAgEy
+MHoGCyqGSIb3DQEJEAILMWugaTBkMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2Fs
+aWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzESMBAGA1UEChMJQk9HVVMg
+TlNTMRQwEgYDVQQDEwtOU1MgVGVzdCBDQQIBMjANBgkqhkiG9w0BAQEFAASCAQBV
+CTYZq9xslbIVjAUJc1kAtsvfiBoDlruTmeqlxUhStB5txygKUcmoNtHEWK0TdKES
+LPW5VGL+R2/CezuVUMekvWVROXKwkHiBlzp6h2DIhE2nTiJn3txCbj0vESscgXeX
+cEcLsA/bY3YS6G72cGFd8DP5C8jyosc+7FO7FOhc5CeGqlFoU1NG7YUoHsU5dPZI
+9G3RyOXBCOy1z53fTfCTyiJ5Lpahldv3pQ6MhRZ65G5udw2DziA9tq1JJXJDu5iv
+6ta16st0W1h9453LNKpIMVs960T1jlDEW1gcW6VL42Pz4oU7+ZFqJpxcN74pROiA
+ZNHgHIHsKXjuaaBTZevQAAAAAAAA
+
new file mode 100644
--- /dev/null
+++ b/mailnews/test/data/smime/alice.env.sig.SHA384.opaque.eml
@@ -0,0 +1,70 @@
+MIME-Version: 1.0
+From: Alice@example.com
+To: Bob@example.com
+Subject: enveloped then opaque-signed sig.SHA384
+Content-Type: application/pkcs7-mime; name=smime.p7m;
+    smime-type=signed-data
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7m
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgIFADCABgkqhkiG9w0B
+BwGggCSABIIETENvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vcGtjczctbWltZTsg
+bmFtZT1zbWltZS5wN207CiAgICBz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RMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH
+Ew1Nb3VudGFpbiBWaWV3MRIwEAYDVQQKEwlCT0dVUyBOU1MxFDASBgNVBAMTC05T
+UyBUZXN0IENBAgEeMA0GCSqGSIb3DQEBAQUABIIBAB1ArPLTP1+Oz2blj8TxXrLj
+x2wAd/dg9xJ7lUtnwDNfGADe1W5NFAqcHbpc1GwfKgApq7JQ5XkPQkSv4aIR/wrV
+0Njta/iMAFiuxaESGkZZtk0uiMgwvPwD+kCw3fS154r4hzOp44v7w8b5pgA8GQBB
+FjscDlVErISe/vTAKxpn++06H3+h/bTCvVXPqVYjCrcO9WiqM7in0CD4u8PHdtaF
+lt99Ffx1CgGyty7HXCQEQevjkPzq9/kfAqalONBSWH5B1lA/p4/5obD29yJFuC+4
+v7c0lSdYNC74sOTRkU9kGVGw68PaONAFcXQCXXwhZCJvX8rpRwIfXam7yE9ZTiEA
+AAAAAAA=
+
new file mode 100644
--- /dev/null
+++ b/mailnews/test/data/smime/alice.env.sig.SHA512.opaque.dave.sig.SHA512.opaque.eml
@@ -0,0 +1,131 @@
+MIME-Version: 1.0
+From: Dave@example.com
+To: Bob@example.com
+Subject: enveloped then opaque-signed sig.SHA512 then opaque signed by dave
+Content-Type: application/pkcs7-mime; name=smime.p7m;
+    smime-type=signed-data
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7m
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgMFADCABgkqhkiG9w0B
+BwGggCSABIIPs0NvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vcGtjczctbWltZTsg
+bmFtZT1zbWltZS5wN207CiAgICBzbWltZS10eXBlPXNpZ25lZC1kYXRhCkNvbnRl
+bnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJhc2U2NApDb250ZW50LURpc3Bvc2l0aW9u
+OiBhdHRhY2htZW50OyBmaWxlbmFtZT1zbWltZS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UK8JBYrbU/Mrl
+t9YDZIk+yndiAPzjvhROkPDqxlj/bYiEbXj9+BjaVPPEvt7kWAWtFvg5HfQ6JoSx
+V3Qicm5x43UZMsTbzeWOfQa1KeqBw+SgHAChrewusXBnEW4eyVgCGbsaz9T2UM37
+kgQyxEzNyOJcec27LOh6M1xR4aSfPBqdcVia5mgE1Ix0dbL+JNCFsJyE6SQJ6DyM
+nLBBAAAAAAAA
+
new file mode 100644
--- /dev/null
+++ b/mailnews/test/data/smime/alice.env.sig.SHA512.opaque.eml
@@ -0,0 +1,70 @@
+MIME-Version: 1.0
+From: Alice@example.com
+To: Bob@example.com
+Subject: enveloped then opaque-signed sig.SHA512
+Content-Type: application/pkcs7-mime; name=smime.p7m;
+    smime-type=signed-data
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7m
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgMFADCABgkqhkiG9w0B
+BwGggCSABIIETENvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vcGtjczctbWltZTsg
+bmFtZT1zbWltZS5wN207CiAgICBzbWltZS10eXBlPWVudmVsb3BlZC1kYXRhCkNv
+bnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJhc2U2NApDb250ZW50LURpc3Bvc2l0
+aW9uOiBhdHRhY2htZW50OyBmaWxlbmFtZT1zbWltZS5wN20KQ29udGVudC1EZXNj
+cmlwdGlvbjogUy9NSU1FIEVuY3J5cHRlZCBNZXNzYWdlCgpNSUFHQ1NxR1NJYjNE
+UUVIQTZDQU1JQUNBUUF4Z2dHRk1JSUJnUUlCQURCcE1HUXhDekFKQmdOVkJBWVRB
+bFZUCk1STXdFUVlEVlFRSUV3cERZV3hwWm05eWJtbGhNUll3RkFZRFZRUUhFdzFO
+YjNWdWRHRnBiaUJXYVdWM01SSXcKRUFZRFZRUUtFd2xDVDBkVlV5Qk9VMU14RkRB
+U0JnTlZCQU1UQz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LpAQj0QXpduxZ6NVFm2nWtExSnxdeJ4Aj7yc2IxZj
+gcwvYVtQSvdMYKSJkF2oAAAAAAAA
+
new file mode 100644
--- /dev/null
+++ b/mailnews/test/data/smime/alice.plain.dsig.SHA1.multipart.dave.dsig.SHA1.multipart.eml
@@ -0,0 +1,105 @@
+MIME-Version: 1.0
+From: Dave@example.com
+To: Bob@example.com
+Subject: clear-signed sig.SHA1 then clear-signed signed by dave
+Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-1; boundary="------------ms010205070902020502030809"
+
+This is a cryptographically signed message in MIME format.
+
+--------------ms010205070902020502030809
+Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-1; boundary="------------ms030903020902020502030404"
+
+This is a cryptographically signed message in MIME format.
+
+--------------ms030903020902020502030404
+Content-Type: text/plain
+
+This is a test message from Alice to Bob.
+
+--------------ms030903020902020502030404
+Content-Type: application/pkcs7-signature; name=smime.p7s
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7s
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAA
+oIIDYjCCA14wggJGoAMCAQICAR4wDQYJKoZIhvcNAQELBQAwZDELMAkGA1UEBhMC
+VVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcx
+EjAQBgNVBAoTCUJPR1VTIE5TUzEUMBIGA1UEAxMLTlNTIFRlc3QgQ0EwHhcNMTkw
+NzAzMTgxMDE0WhcNMjQwNzAzMTgxMDE0WjCBgDELMAkGA1UEBhMCVVMxEzARBgNV
+BAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxEjAQBgNVBAoT
+CUJPR1VTIE5TUzEgMB4GCSqGSIb3DQEJARYRQWxpY2VAZXhhbXBsZS5jb20xDjAM
+BgNVBAMTBUFsaWNlMIIBIjAN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AQxazBpMGQxCzAJBgNVBAYTAlVTMRMwEQYD
+VQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYDVQQK
+EwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBAgEeMHoGCyqGSIb3DQEJ
+EAILMWugaTBkMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQG
+A1UEBxMNTW91bnRhaW4gVmlldzESMBAGA1UEChMJQk9HVVMgTlNTMRQwEgYDVQQD
+EwtOU1MgVGVzdCBDQQIBHjANBgkqhkiG9w0BAQEFAASCAQBpRHBRQNJYMMGDVNUu
+ImpFhRB5MmRKGTXjxe0s5cAHYmiZ68xMx/GojvBIL3wUiLqP9zjirO0MVaU1p34g
++yUuCh1rCHK+qtnJjnFzMJrEV93iSmxzkWn5i3ZarWwYpZ/SU7fDncfTIFIDjhK2
+IQ44uBaon6OhyUCBSIvEd+h6CNOAtN2ZsYEE4FmeZkb6gZv0HL8LYsK8U5rCz+kt
+8LIUstQowe6PHMPG/qmym239TCD4EkFJYnNhrO2GgZ1T0Kq8AC1B5B4w8FVtnxO7
+bgs3L4O7Ma305OFD1Ly9B4/9He7Cho9tpOr2GMTdBpHix8zu1KAuPTI6Pl0DqkDI
+/ABHAAAAAAAA
+--------------ms030903020902020502030404--
+
+
+--------------ms010205070902020502030809
+Content-Type: application/pkcs7-signature; name=smime.p7s
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7s
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAA
+oIIDXzCCA1swggJDoAMCAQICATIwDQYJKoZIhvcNAQELBQAwZDELMAkGA1UEBhMC
+VVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcx
+EjAQBgNVBAoTCUJPR1VTIE5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aTBkMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZv
+cm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzESMBAGA1UEChMJQk9HVVMgTlNT
+MRQwEgYDVQQDEwtOU1MgVGVzdCBDQQIBMjAJBgUrDgMCGgUAoIIBNTAYBgkqhkiG
+9w0BCQMxCwYJKoZIhvcNAQcBMCMGCSqGSIb3DQEJBDEWBBRFSD9z747Sa6twmmcf
+FFbOohJPXzB4BgkrBgEEAYI3EAQxazBpMGQxCzAJBgNVBAYTAlVTMRMwEQYDVQQI
+EwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYDVQQKEwlC
+T0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBAgEyMHoGCyqGSIb3DQEJEAIL
+MWugaTBkMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE
+BxMNTW91bnRhaW4gVmlldzESMBAGA1UEChMJQk9HVVMgTlNTMRQwEgYDVQQDEwtO
+U1MgVGVzdCBDQQIBMjANBgkqhkiG9w0BAQEFAASCAQBm9R/OvuDZY/xddnoWyJg1
+ZQH8yfzfh20zRFaQ1L2qfs7o6TO3ADBNKYzXPwI0MyvVkdfhjY46oueffoc1kt7R
+1o8D2ZBF7oo2HReP07JKgermirDo3xicPxXDhs1P6YccEKMAM+AV0pk6KunCLc69
+lBiIomkBsxqioz8kyCx+fyH8/t1IR5Ri/8+7PEAwtKgCKs/yuqywhVDSrjsr3yLV
+TdhIiQMiNjLElSac5dKiOkDuNqK+lSwlFCgvmE8uEicYR9V3hywP1Uw/GhRqnt68
+1JcRADgig0tU6BO0PtKIJf6vqAxE15A298ZarPclLZamAmTW0YfM0icUvAMYp71H
+AAAAAAAA
+--------------ms010205070902020502030809--
+
new file mode 100644
--- /dev/null
+++ b/mailnews/test/data/smime/alice.plain.dsig.SHA1.multipart.dave.sig.SHA1.opaque.eml
@@ -0,0 +1,104 @@
+MIME-Version: 1.0
+From: Dave@example.com
+To: Bob@example.com
+Subject: clear-signed sig.SHA1 then opaque signed by dave
+Content-Type: application/pkcs7-mime; name=smime.p7m;
+    smime-type=signed-data
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7m
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAaCA
+JIAEggr8Q29udGVudC1UeXBlOiBtdWx0aXBhcnQvc2lnbmVkOyBwcm90b2NvbD0i
+YXBwbGljYXRpb24vcGtjczctc2lnbmF0dXJlIjsgbWljYWxnPXNoYS0xOyBib3Vu
+ZGFyeT0iLS0tLS0tLS0tLS0tbXMwMzA5MDMwMjA5MDIwMjA1MDIwMzA0MDQiCgpU
+aGlzIGlzIGEgY3J5cHRvZ3JhcGhpY2FsbHkgc2lnbmVkIG1lc3NhZ2UgaW4gTUlN
+RSBmb3JtYXQuCgotLS0tLS0tLS0tLS0tLW1zMDMwOTAzMDIwOTAyMDIwNTAyMDMw
+NDA0CkNvbnRlbnQtVHlwZTogdGV4dC9wbGFpbgoKVGhpcyBpcyBhIHRlc3QgbWVz
+c2FnZSBmcm9tIEFsaWNlIHRvIEJvYi4KCi0tLS0tLS0tLS0tLS0tbXMwMzA5MDMw
+MjA5MDIwMjA1MDIwMzA0MDQKQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9wa2Nz
+Ny1zaWduYXR1cmU7IG5hbWU9c21pbWUucDdzCkNvbnRlbnQtVHJhbnNmZXItRW5j
+b2Rpbmc6IGJhc2U2NApDb250ZW50LURpc3Bvc2l0aW9uOiBhdHRhY2htZW50OyBm
+aWxlbmFtZT1zbWltZS5wN3MKQ29udGVudC1EZXNjcmlwdGlvbjogUy9NSU1FIENy
+eXB0b2dyYXBoaWMgU2lnbmF0dXJlCgpNSUFHQ1NxR1NJYjNEUUVIQXFDQU1JQUNB
+UUV4Q3pB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ime/alice.plain.dsig.SHA256.multipart.dave.dsig.SHA256.multipart.eml
@@ -0,0 +1,105 @@
+MIME-Version: 1.0
+From: Dave@example.com
+To: Bob@example.com
+Subject: clear-signed sig.SHA256 then clear-signed signed by dave
+Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="------------ms010205070902020502030809"
+
+This is a cryptographically signed message in MIME format.
+
+--------------ms010205070902020502030809
+Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="------------ms030903020902020502030404"
+
+This is a cryptographically signed message in MIME format.
+
+--------------ms030903020902020502030404
+Content-Type: text/plain
+
+This is a test message from Alice to Bob.
+
+--------------ms030903020902020502030404
+Content-Type: application/pkcs7-signature; name=smime.p7s
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7s
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0B
+BwEAAKCCA2IwggNeMIICRqADAgECAgEeMA0GCSqGSIb3DQEBCwUAMGQxCzAJBgNV
+BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBW
+aWV3MRIwEAYDVQQKEwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBMB4X
+DTE5MDcwMzE4MTAxNFoXDTI0MDcwMzE4MTAxNFowgYAxCzAJBgNVBAYTAlVTMRMw
+EQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYD
+VQQKEwlCT0dVUyBOU1MxIDAeBgkqhkiG9w0BCQEWEUFsaWNlQGV4YW1wbGUuY29t
+MQ4wDAYDVQQDEwVBbGljZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
+AMP3jRPxSHw+J7/Bm7Wr+Krv/hvjHPV4mhThkQK+I2SCZSbKI1SGIuFjLwnMDFVs
+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AQBgNVBAoTCUJPR1VTIE5TUzEUMBIGA1UEAxMLTlNTIFRl
+c3QgQ0ECAR4wegYLKoZIhvcNAQkQAgsxa6BpMGQxCzAJBgNVBAYTAlVTMRMwEQYD
+VQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYDVQQK
+EwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBAgEeMA0GCSqGSIb3DQEB
+AQUABIIBAGRgN/AnK/jinZjcaB7ELVup/2H3q70q/AH3BLDmXNbpQkUmqKOcevzD
+yI/YBQS5TtwEEGannMf+++kWdcyS7EUamynWdxI/HoaBOk37up4vjtMMepCT1GlY
+PjXGADDSjw/XzJQHb1LPe6gN4ejHJOtFutZ2NNf2QIWuXQRDV6XATAksy5hG7HZq
+xZuJM1SKCv89UmS8yX6nK30F6Bnh3DglD2/0SBVjhMBo2OWj7mGdfOLZGBjIJjRS
+lLMlrkF8aq8oaDR2tHDBa1Zptn8tCfYTk0SP25O5rVlZ3Nf3dKZeRGzoLVSvRmo4
+QRBlDQUPmejobqGV1dCZXQcXntWTaykAAAAAAAA=
+--------------ms030903020902020502030404--
+
+
+--------------ms010205070902020502030809
+Content-Type: application/pkcs7-signature; name=smime.p7s
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7s
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0B
+BwEAAKCCA18wggNbMIICQ6ADAgECAgEyMA0GCSqGSIb3DQEBCwUAMGQxCzAJBgNV
+BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBW
+aWV3MRIwEAYDVQQKEwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBMB4X
+DTE5MDcwMzE4MTAxN1oXDTI0MDcwMzE4MTAxN1owfjELMAkGA1UEBhM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
+IE5TUzEUMBIGA1UEAxMLTlNTIFRlc3QgQ0ECATIwDQYJYIZIAWUDBAIBBQCgggFB
+MBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwLwYJKoZIhvcNAQkEMSIEIEJnQINr
+AZnJY+wCjs9YiyAICDoQi5+ogBGlS1E3nedDMHgGCSsGAQQBgjcQBDFrMGkwZDEL
+MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDU1vdW50
+YWluIFZpZXcxEjAQBgNVBAoTCUJPR1VTIE5TUzEUMBIGA1UEAxMLTlNTIFRlc3Qg
+Q0ECATIwegYLKoZIhvcNAQkQAgsxa6BpMGQxCzAJBgNVBAYTAlVTMRMwEQYDVQQI
+EwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYDVQQKEwlC
+T0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBAgEyMA0GCSqGSIb3DQEBAQUA
+BIIBAHtZWbfzJ+6JhAYLSrsbTG/BpPglLjCQXbOqJdpmdxy4L+ax7by23Jv+MjmZ
+qDatOSMuXvqH+zpwzQnmx/0YlArv4d8rENWkGt1rzVfoOjeywVJ5AId2BeXOlIWF
+SXVKFaNMC/xilwQzLuayC4Ycp4FU6j/ebPL8EqIMIOqWrQn23It3TGjL0uBR6+1O
++V3PGrt6dNFeUacNwS2TTeIGabFcEjH5n8W8sDe/dH4WV45M/cmfhejQtI5TBxfG
+aKxrUcviyP+btpT3Tk+Y/TmFTb5cRRyS1wZ/GDIrIZcs1L6rA8nvVE2YT3O6LUl3
+N9BdChLERw8ADBBsZ87D4YkomW4AAAAAAAA=
+--------------ms010205070902020502030809--
+
new file mode 100644
--- /dev/null
+++ b/mailnews/test/data/smime/alice.plain.dsig.SHA256.multipart.dave.sig.SHA256.opaque.eml
@@ -0,0 +1,105 @@
+MIME-Version: 1.0
+From: Dave@example.com
+To: Bob@example.com
+Subject: clear-signed sig.SHA256 then opaque signed by dave
+Content-Type: application/pkcs7-mime; name=smime.p7m;
+    smime-type=signed-data
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7m
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0B
+BwGggCSABIILGkNvbnRlbnQtVHlwZTogbXVsdGlwYXJ0L3NpZ25lZDsgcHJvdG9j
+b2w9ImFwcGxpY2F0aW9uL3BrY3M3LXNpZ25hdHVyZSI7IG1pY2FsZz1zaGEtMjU2
+OyBib3VuZGFyeT0iLS0tLS0tLS0tLS0tbXMwMzA5MDMwMjA5MDIwMjA1MDIwMzA0
+MDQiCgpUaGlzIGlzIGEgY3J5cHRvZ3JhcGhpY2FsbHkgc2lnbmVkIG1lc3NhZ2Ug
+aW4gTUlNRSBmb3JtYXQuCgotLS0tLS0tLS0tLS0tLW1zMDMwOTAzMDIwOTAyMDIw
+NTAyMDMwNDA0CkNvbnRlbnQtVHlwZTogdGV4dC9wbGFpbgoKVGhpcyBpcyBhIHRl
+c3QgbWVzc2FnZSBmcm9tIEFsaWNlIHRvIEJvYi4KCi0tLS0tLS0tLS0tLS0tbXMw
+MzA5MDMwMjA5MDIwMjA1MDIwMzA0MDQKQ29udGVudC1UeXBlOiBhcHBsaWNhdGlv
+bi9wa2NzNy1zaWduYXR1cmU7IG5hbWU9c21pbWUucDdzCkNvbnRlbnQtVHJhbnNm
+ZXItRW5jb2Rpbmc6IGJhc2U2NApDb250ZW50LURpc3Bvc2l0aW9uOiBhdHRhY2ht
+ZW50OyBmaWxlbmFtZT1zbWltZS5wN3MKQ29udGVudC1EZXNjcmlwdGlvbjogUy9N
+SU1FIENyeXB0b2dyYXBoaWMgU2lnbmF0dXJlCgpNSUFHQ1NxR1NJYjNEUUVIQXFD
+QU1JQUNBUUV4RHpBTkJnbGdoa2dCWlFNRUFnRUZBRENBQmdrcWhraUc5dzBCCkJ3
+RUF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644
--- /dev/null
+++ b/mailnews/test/data/smime/alice.plain.dsig.SHA384.multipart.dave.dsig.SHA384.multipart.eml
@@ -0,0 +1,105 @@
+MIME-Version: 1.0
+From: Dave@example.com
+To: Bob@example.com
+Subject: clear-signed sig.SHA384 then clear-signed signed by dave
+Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-384; boundary="------------ms010205070902020502030809"
+
+This is a cryptographically signed message in MIME format.
+
+--------------ms010205070902020502030809
+Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-384; boundary="------------ms030903020902020502030404"
+
+This is a cryptographically signed message in MIME format.
+
+--------------ms030903020902020502030404
+Content-Type: text/plain
+
+This is a test message from Alice to Bob.
+
+--------------ms030903020902020502030404
+Content-Type: application/pkcs7-signature; name=smime.p7s
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7s
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgIFADCABgkqhkiG9w0B
+BwEAAKCCA2IwggNeMIICRqADAgECAgEeMA0GCSqGSIb3DQEBCwUAMGQxCzAJBgNV
+BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBW
+aWV3MRIwEAYDVQQKEwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBMB4X
+DTE5MDcwMzE4MTAxNFoXDTI0MDcwMzE4MTAxNFowgYAxCzAJBgNVBAYTAlVTMRMw
+EQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYD
+VQQKEwlCT0dVUyBOU1MxIDAeBgkqhkiG9w0BCQEWEUFsaWNlQGV4YW1wbGUuY29t
+MQ4wDAYDVQQDEwVBbGljZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
+AMP3jRPxSHw+J7/Bm7Wr+Krv/hvjHPV4mhThkQK+I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m9y
+bmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYDVQQKEwlCT0dVUyBOU1Mx
+FDASBgNVBAMTC05TUyBUZXN0IENBAgEeMHoGCyqGSIb3DQEJEAILMWugaTBkMQsw
+CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRh
+aW4gVmlldzESMBAGA1UEChMJQk9HVVMgTlNTMRQwEgYDVQQDEwtOU1MgVGVzdCBD
+QQIBHjANBgkqhkiG9w0BAQEFAASCAQCk4mEuvr1v4R5z9CDdZd9mHTGG8p5oS/Y/
+rAupCFbC0dlKcWltanh3olb7juUdYrGUBYjFWoJhN1GZRt8+vCst/Aj4dCAJgDcq
+cpaoyVINAZO33iDlUf1NMIoN8ACSQ9hQcO/7XM+RisjEO/ydHkzRsHV5hOpMUb5b
+AD4Oe9o9XR4aPvp0L4nxt3c9jCHLu3sEAJn3UEqoeg2vWFLldsz9jdIQ4q5qjr2b
+gQxn8nVx8JqOsfZEBasGeKnzYoLkAvFbQtZEorlxDn2909Y4nsvvlA3u6ciVw+xV
+b7NwvBsoW9Cl9GTfJcG5CKEiSEGtjfxCWrAA/JjAGAkQK4tvYzCWAAAAAAAA
+--------------ms030903020902020502030404--
+
+
+--------------ms010205070902020502030809
+Content-Type: application/pkcs7-signature; name=smime.p7s
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7s
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgIFADCABgkqhkiG9w0B
+BwEAAKCCA18wggNbMIICQ6ADAgECAgEyMA0GCSqGSIb3DQEBCwUAMGQxCzAJBgNV
+BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBW
+aWV3MRIwEAYDVQQKEwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBMB4X
+DTE5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AUBgNVBAcTDU1vdW50YWluIFZpZXcxEjAQBgNVBAoTCUJPR1VT
+IE5TUzEUMBIGA1UEAxMLTlNTIFRlc3QgQ0ECATIwDQYJYIZIAWUDBAICBQCgggFR
+MBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwPwYJKoZIhvcNAQkEMTIEMOuZqDbS
+C0o6xPH3xw2AhaRUKF0VCs4GvbgblqQ5oD6/E/Zv0HjQ4uwQ1umyqMfo0jB4Bgkr
+BgEEAYI3EAQxazBpMGQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlh
+MRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYDVQQKEwlCT0dVUyBOU1MxFDAS
+BgNVBAMTC05TUyBUZXN0IENBAgEyMHoGCyqGSIb3DQEJEAILMWugaTBkMQswCQYD
+VQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4g
+VmlldzESMBAGA1UEChMJQk9HVVMgTlNTMRQwEgYDVQQDEwtOU1MgVGVzdCBDQQIB
+MjANBgkqhkiG9w0BAQEFAASCAQCzqMRRc2Zk1OKwqd3ppynZP1ShDUvB2njwXroR
+hPqukZBigP/b5qmWIL0jcyMW+rT27ipiLG53qtX7p24NsVTF24d69AMNjZNY3xeJ
+j5B984PvS6wFArr4NTB8wSCAt9fuP/LtH2N1CCMrh3UPr/qNiypmEe/8W4lOG6nG
+l1rtLxOuV6H6Z+v8SpDtXRoaz25cIsdL8XlZwpMbJdKi9K+5Nn4M3RfkvOuCZYuI
+ZOwIjktxy0Q6fMUBezwUMSwAKpRS0RNsriMN1Bd24WWs896KGvUMAD8prSIemdSn
+Rtqdebhf7OsaKSJNFTGXRqEj685sVinSKTt3xPQYXZf7x8p7AAAAAAAA
+--------------ms010205070902020502030809--
+
new file mode 100644
--- /dev/null
+++ b/mailnews/test/data/smime/alice.plain.dsig.SHA384.multipart.dave.sig.SHA384.opaque.eml
@@ -0,0 +1,106 @@
+MIME-Version: 1.0
+From: Dave@example.com
+To: Bob@example.com
+Subject: clear-signed sig.SHA384 then opaque signed by dave
+Content-Type: application/pkcs7-mime; name=smime.p7m;
+    smime-type=signed-data
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7m
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgIFADCABgkqhkiG9w0B
+BwGggCSABIILLkNvbnRlbnQtVHlwZTogbXVsdGlwYXJ0L3NpZ25lZDsgcHJvdG9j
+b2w9ImFwcGxpY2F0aW9uL3BrY3M3LXNpZ25hdHVyZSI7IG1pY2FsZz1zaGEtMzg0
+OyBib3VuZGFyeT0iLS0tLS0tLS0tLS0tbXMwMzA5MDMwMjA5MDIwMjA1MDIwMzA0
+MDQiCgpUaGlzIGlzIGEgY3J5cHRvZ3JhcGhpY2FsbHkgc2lnbmVkIG1lc3NhZ2Ug
+aW4gTUlNRSBmb3JtYXQuCgotLS0tLS0tLS0tLS0tLW1zMDMwOTAzMDIwOTAyMDIw
+NTAyMDMwNDA0CkNvbnRlbnQtVHlwZTogdGV4dC9wbGFpbgoKVGhpcyBpcyBhIHRl
+c3QgbWVzc2FnZSBmcm9tIEFsaWNlIHRvIEJvYi4KCi0tLS0tLS0tLS0tLS0tbXMw
+MzA5MDMwMjA5MDIwMjA1MDIwMzA0MDQKQ29udGVudC1UeXBlOiBhcHBsaWNhdGlv
+bi9wa2NzNy1zaWduYXR1cmU7IG5hbWU9c21pbWUucDdzCkNvbnRlbnQtVHJhbnNm
+ZXItRW5jb2Rpbmc6IGJhc2U2NApDb250ZW50LURpc3Bvc2l0aW9uOiBhdHRhY2ht
+ZW50OyBmaWxlbmFtZT1zbWltZS5wN3MKQ29udGVudC1EZXNjcmlwdGlvbjogUy9N
+SU1FIENyeXB0b2dyYXBoaWMgU2lnbmF0dXJlCgpNSUFHQ1NxR1NJYjNEUUVIQXFD
+QU1JQU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zvbzkiFDtkcY3K1M2/
+YISoXS1MszuOTfuO6Lt7LRc9OYVzmQ9OjFXJp5Zrkf5zVh5z4i0jMgmSsJAi0Sy0
+GK5sgLkv/CmA4eUufnrsDKeMbANhwPrOl17R7vsoAAAAAAAA
+
new file mode 100644
--- /dev/null
+++ b/mailnews/test/data/smime/alice.plain.dsig.SHA512.multipart.dave.dsig.SHA512.multipart.eml
@@ -0,0 +1,107 @@
+MIME-Version: 1.0
+From: Dave@example.com
+To: Bob@example.com
+Subject: clear-signed sig.SHA512 then clear-signed signed by dave
+Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-512; boundary="------------ms010205070902020502030809"
+
+This is a cryptographically signed message in MIME format.
+
+--------------ms010205070902020502030809
+Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-512; boundary="------------ms030903020902020502030404"
+
+This is a cryptographically signed message in MIME format.
+
+--------------ms030903020902020502030404
+Content-Type: text/plain
+
+This is a test message from Alice to Bob.
+
+--------------ms030903020902020502030404
+Content-Type: application/pkcs7-signature; name=smime.p7s
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7s
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgMFADCABgkqhkiG9w0B
+BwEAAKCCA2IwggNeMIICRqADAgECAgEeMA0GCSqGSIb3DQEBCwUAMGQxCzAJBgNV
+BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBW
+aWV3MRIwEAYDVQQKEwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBMB4X
+DTE5MDcwMzE4MTAxNFoXDTI0MDcwMzE4MTAxNFowgYAxCzAJBgNVBAYTAlVTMRMw
+EQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYD
+VQQKEwlCT0dVUyBOU1MxIDAeBg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oZIhvcNAQkEMUIEQD19
+WOnX3C9YP8Tz7gGDkLPiv36orVfLbv7L5+nHNhBNFBFfPHvCLJPPifynWat+Sam6
+uw+JXECk2raOQRrOnywweAYJKwYBBAGCNxAEMWswaTBkMQswCQYDVQQGEwJVUzET
+MBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzESMBAG
+A1UEChMJQk9HVVMgTlNTMRQwEgYDVQQDEwtOU1MgVGVzdCBDQQIBHjB6BgsqhkiG
+9w0BCRACCzFroGkwZDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWEx
+FjAUBgNVBAcTDU1vdW50YWluIFZpZXcxEjAQBgNVBAoTCUJPR1VTIE5TUzEUMBIG
+A1UEAxMLTlNTIFRlc3QgQ0ECAR4wDQYJKoZIhvcNAQEBBQAEggEAneEPwdFiGQ4o
+8gYa6w31ekmLadKI2/4sl8/QL+8E1nv//iiCWTZuTFkt6aimj979ZuDYC/K12Pwm
+DbD9YhVCNT4BEDqtCtQ2QWfjiRIZjZ/xh0REXlEp9OC0XFQ7oLECfm4afu9jWrFn
+OOT7Cr+Gw2DHIXlh0coMKXYkGgHApsPEb0J4w6KXqL8Sf3xWgf4Fr7kUlQZS/Gj6
+W9H5S8X0x90jqb1wklucb0FsaRxgwMhwQynsj7qFkyIauLM5ThEvQWPQZFHRmwCB
+f6M50XcqkhMK7E7doDc5kLL8II19G0lZQuUWodFvRdl9E8TY+59zvItVdxuaNvS8
+d8MDecSulwAAAAAAAA==
+--------------ms030903020902020502030404--
+
+
+--------------ms010205070902020502030809
+Content-Type: application/pkcs7-signature; name=smime.p7s
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7s
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgMFADCABgkqhkiG9w0B
+BwEAAKCCA18wggNbMIICQ6ADAgECAgEyMA0GCSqGSIb3DQ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Vs5SjF
+dlFtKxGMps00PyNqymGNdpv81m8uQ/lIJIC4fxosMo3AnQSI4dkJHEnk72sc42o1
+TyImHgAAAAAAAA==
+--------------ms010205070902020502030809--
+
new file mode 100644
--- /dev/null
+++ b/mailnews/test/data/smime/alice.plain.dsig.SHA512.multipart.dave.sig.SHA512.opaque.eml
@@ -0,0 +1,107 @@
+MIME-Version: 1.0
+From: Dave@example.com
+To: Bob@example.com
+Subject: clear-signed sig.SHA512 then opaque signed by dave
+Content-Type: application/pkcs7-mime; name=smime.p7m;
+    smime-type=signed-data
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7m
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgMFADCABgkqhkiG9w0B
+BwGggCSABIILR0NvbnRlbnQtVHlwZTogbXVsdGlwYXJ0L3NpZ25lZDsgcHJvdG9j
+b2w9ImFwcGxpY2F0aW9uL3BrY3M3LXNpZ25hdHVyZSI7IG1pY2FsZz1zaGEtNTEy
+OyBib3VuZGFyeT0iLS0tLS0tLS0tLS0tbXMwMzA5MDMwMjA5MDIwMjA1MDIwMzA0
+MDQiCgpUaGlzIGlzIGEgY3J5cHRvZ3JhcGhpY2FsbHkgc2lnbmVkIG1lc3NhZ2Ug
+aW4gTUlNRSBmb3JtYXQuCgotLS0tLS0tLS0tLS0tLW1zMDMwOTAzMDIwOTAyMDIw
+NTAyMDMwNDA0CkNvbnRlbnQtVHlwZTogdGV4dC9wbGFpbgoKVGhpcyBpcyBhIHRl
+c3QgbWVzc2FnZSBmcm9tIEFsaWNlIHRvIEJvYi4KCi0tLS0tLS0tLS0tLS0tbXMw
+MzA5MDMwMjA5MDIwMjA1MDIwMzA0MDQKQ29udGVudC1UeXBlOiBhcHBsaWNhdGlv
+bi9wa2NzNy1zaWduYXR1cmU7IG5hbWU9c21pbWUucDdzCkNvbnRlbnQtVHJhbnNm
+ZXItRW5jb2Rpbmc6IGJhc2U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SIb3DQEB
+AQUABIIBAIQfBE9grcEeFexBlwtGmJJjQtraSfMDnuoPVecrTFXFPP9eFapWOpC1
+pmnaw26krzDZJ2PNp9pHLxFwCA3kgcKrrbDRTgY58+qDEOjqQKvWQjiO+RqnmhMp
+DSA/MUKfrK+uZi/CUMMkwtpx0HtxzSWfsQ7gFKV0dryFmBDZCeQR0CQQtreDNDCw
+ovRzeVL7I3R6mlXIqbO8ojKHZgPOt/3ttFd6/2bmKaLDknNN2QgY28RIKe1eN7Cx
+I2XN0StXvsZ5/tdaKn1r8Uw3NJb8wkYuySB1JHwwHvShk6J+Zoq/bw1KM4TpszFF
+wyZhy6k1lZj2WhG7j964OH+BeH4BuWwAAAAAAAA=
+
new file mode 100644
--- /dev/null
+++ b/mailnews/test/data/smime/alice.plain.sig.SHA1.opaque.dave.dsig.SHA1.multipart.eml
@@ -0,0 +1,95 @@
+MIME-Version: 1.0
+From: Dave@example.com
+To: Bob@example.com
+Subject: opaque-signed sig.SHA1 then clear-signed signed by dave
+Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-1; boundary="------------ms010205070902020502030809"
+
+This is a cryptographically signed message in MIME format.
+
+--------------ms010205070902020502030809
+Content-Type: application/pkcs7-mime; name=smime.p7m;
+    smime-type=signed-data
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7m
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAaCA
+JIAER0NvbnRlbnQtVHlwZTogdGV4dC9wbGFpbg0KDQpUaGlzIGlzIGEgdGVzdCBt
+ZXNzYWdlIGZyb20gQWxpY2UgdG8gQm9iLg0KAAAAAAAAoIIDYjCCA14wggJGoAMC
+AQICAR4wDQYJKoZIhvcNAQELBQAwZDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNh
+bGlmb3JuaWExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxEjAQBgN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AsUC
+AQEwaTBkMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE
+BxMNTW91bnRhaW4gVmlldzESMBAGA1UEChMJQk9HVVMgTlNTMRQwEgYDVQQDEwtO
+U1MgVGVzdCBDQQIBHjAJBgUrDgMCGgUAoIIBNTAYBgkqhkiG9w0BCQMxCwYJKoZI
+hvcNAQcBMCMGCSqGSIb3DQEJBDEWBBQ6lsBnOgG++otJRrNIvABL/tlP9DB4Bgkr
+BgEEAYI3EAQxazBpMGQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlh
+MRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYDVQQKEwlCT0dVUyBOU1MxFDAS
+BgNVBAMTC05TUyBUZXN0IENBAgEeMHoGCyqGSIb3DQEJEAILMWugaTBkMQswCQYD
+VQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4g
+VmlldzESMBAGA1UEChMJQk9HVVMgTlNTMRQwEgYDVQQDEwtOU1MgVGVzdCBDQQIB
+HjANBgkqhkiG9w0BAQEFAASCAQBpRHBRQNJYMMGDVNUuImpFhRB5MmRKGTXjxe0s
+5cAHYmiZ68xMx/GojvBIL3wUiLqP9zjirO0MVaU1p34g+yUuCh1rCHK+qtnJjnFz
+MJrEV93iSmxzkWn5i3ZarWwYpZ/SU7fDncfTIFIDjhK2IQ44uBaon6OhyUCBSIvE
+d+h6CNOAtN2ZsYEE4FmeZkb6gZv0HL8LYsK8U5rCz+kt8LIUstQowe6PHMPG/qmy
+m239TCD4EkFJYnNhrO2GgZ1T0Kq8AC1B5B4w8FVtnxO7bgs3L4O7Ma305OFD1Ly9
+B4/9He7Cho9tpOr2GMTdBpHix8zu1KAuPTI6Pl0DqkDI/ABHAAAAAAAA
+
+--------------ms010205070902020502030809
+Content-Type: application/pkcs7-signature; name=smime.p7s
+Content-Transfer-Encoding: base64
+Content-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/sru29GGi9WcMiVbThdQca6nQ3eTUmC
+h/Op6MDomGYLEP4f0Z94KdEG5aA4OtN32L58cme6SBq6TX0Ya+arKdAlVd8gzIz+
+zplP7hHkWZOYoLPDTxf0ujJ4DHFEpIxUOOw1aZysiuNwJHoSIAUFPJl22hFTE8qH
+AAAAAAAA
+--------------ms010205070902020502030809--
+
new file mode 100644
--- /dev/null
+++ b/mailnews/test/data/smime/alice.plain.sig.SHA1.opaque.dave.sig.SHA1.opaque.eml
@@ -0,0 +1,99 @@
+MIME-Version: 1.0
+From: Dave@example.com
+To: Bob@example.com
+Subject: opaque-signed sig.SHA1 then opaque signed by dave
+Content-Type: application/pkcs7-mime; name=smime.p7m;
+    smime-type=signed-data
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7m
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAaCA
+JIAEggn4Q29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9wa2NzNy1taW1lOyBuYW1l
+PXNtaW1lLnA3bTsKICAgIHNtaW1lLXR5cGU9c2lnbmVkLWRhdGEKQ29udGVudC1U
+cmFuc2Zlci1FbmNvZGluZzogYmFzZTY0CkNvbnRlbnQtRGlzcG9zaXRpb246IGF0
+dGFjaG1lbnQ7IGZpbGVuYW1lPXNtaW1lLnA3bQpDb250ZW50LURlc2NyaXB0aW9u
+OiBTL01JTUUgQ3J5cHRvZ3JhcGhpYyBTaWduYXR1cmUKCk1JQUdDU3FHU0liM0RR
+RUhBcUNBTUlBQ0FRRXhDekFKQmdVckRnTUNHZ1VBTUlBR0NTcUdTSWIzRFFFSEFh
+Q0EKSklBRVIwTnZiblJsYm5RdFZIbHdaVG9nZEdWNGRDOXdiR0ZwYmcwS0RRcFVh
+R2x6SUdseklHRWdkR1Z6ZENCdApaWE56WVdkbElHWnliMjBnUVd4cFkyVWdkRzhn
+UW05aUxnMEtBQUF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
+From: Dave@example.com
+To: Bob@example.com
+Subject: opaque-signed sig.SHA256 then clear-signed signed by dave
+Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="------------ms010205070902020502030809"
+
+This is a cryptographically signed message in MIME format.
+
+--------------ms010205070902020502030809
+Content-Type: application/pkcs7-mime; name=smime.p7m;
+    smime-type=signed-data
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7m
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0B
+BwGggCSABEdDb250ZW50LVR5cGU6IHRleHQvcGxhaW4NCg0KVGhpcyBpcyBhIHRl
+c3QgbWVzc2FnZSBmcm9tIEFsaWNlIHRvIEJvYi4NCgAAAAAAAKCCA2IwggNeMIIC
+RqADAgECAgEeMA0GCSqGSIb3DQEBCwUAMGQxCzAJBgNVBAYTAlVTMRMwEQYDVQQI
+EwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYDVQQKEwlC
+T0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBMB4XDTE5MDcwMzE4MTAxNFoX
+DTI0MDcwMzE4MTAxNFowgYAxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9y
+bmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYDVQQKEwlCT0dVUyBOU1Mx
+IDAeBgkqhkiG9w0BCQEWEUFsaWNlQGV4YW1wbGUuY29tMQ4wDAYDVQQDEwVBbGlj
+ZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMP3jRPxSHw+J7/Bm7Wr
++Krv/hvjHPV4mhThkQK+I2SCZSbKI1SGIuFjLwnMDFVsTJKYlPL+il2nLSxa0w/j
+z47toypKI0FZ7aDe/atnB9rqjjxxocxzeCpyxlL3pLlryeWPSxAooBUhY3PG8f48
+znu819rs+0M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GQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlh
+MRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYDVQQKEwlCT0dVUyBOU1MxFDAS
+BgNVBAMTC05TUyBUZXN0IENBAgEeMA0GCSqGSIb3DQEBAQUABIIBAGRgN/AnK/ji
+nZjcaB7ELVup/2H3q70q/AH3BLDmXNbpQkUmqKOcevzDyI/YBQS5TtwEEGannMf+
+++kWdcyS7EUamynWdxI/HoaBOk37up4vjtMMepCT1GlYPjXGADDSjw/XzJQHb1LP
+e6gN4ejHJOtFutZ2NNf2QIWuXQRDV6XATAksy5hG7HZqxZuJM1SKCv89UmS8yX6n
+K30F6Bnh3DglD2/0SBVjhMBo2OWj7mGdfOLZGBjIJjRSlLMlrkF8aq8oaDR2tHDB
+a1Zptn8tCfYTk0SP25O5rVlZ3Nf3dKZeRGzoLVSvRmo4QRBlDQUPmejobqGV1dCZ
+XQcXntWTaykAAAAAAAA=
+
+--------------ms010205070902020502030809
+Content-Type: application/pkcs7-signature; name=smime.p7s
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7s
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0B
+BwEAAKCCA18wggNbMIICQ6ADAgECAgEyMA0GCSqGSIb3DQEBCwUAMGQxCzAJBgNV
+BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBW
+aWV3MRIwEAYDVQQKEwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBMB4X
+DTE5MDcwMzE4MTAxN1oXDTI0MDcwMzE4MTAxN1owfjELMAkGA1UEBhMCVVMxEzAR
+BgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxEjAQBgNV
+BAoTCUJPR1VTIE5TUzEfMB0GCS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EwLwYJKoZIhvcNAQkEMSIEINRzqWrx
+gVe/o6x3x3nHrV9fX9pJcOj9p8BSGRFC/fd1MHgGCSsGAQQBgjcQBDFrMGkwZDEL
+MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDU1vdW50
+YWluIFZpZXcxEjAQBgNVBAoTCUJPR1VTIE5TUzEUMBIGA1UEAxMLTlNTIFRlc3Qg
+Q0ECATIwegYLKoZIhvcNAQkQAgsxa6BpMGQxCzAJBgNVBAYTAlVTMRMwEQYDVQQI
+EwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYDVQQKEwlC
+T0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBAgEyMA0GCSqGSIb3DQEBAQUA
+BIIBAJNShrKkYYppc4fkvm4p4eu86sCNBPdSaW3YznJdr266dSLFH/05OKyo4BP4
+iMgHaJuJJa+im+gubWNhGbuJ3B61AunfxPELt8p9k9FN+4kdJFA02WAUHgJ5vwKV
+a6pi2Etp/c/u+2G+UPLOCPEsM5C8yax7MOLtESnhQR8djnGj0hKsITXHhBdpK3wm
+YmcH1V4RdC4pkhD8kSv4btz7Gt/iOT/Vt+NcpmGPe6sXYJfNUEkuJAmwLSgsnk6z
+XBNzgeJTWwrq6rV5gI8tcXc+S36j79vue/S4U9Nk9ufhDubFGgqZSig0tGXVHgKA
+OOiocaUGaWRG7mYk+6fo4TPn3jIAAAAAAAA=
+--------------ms010205070902020502030809--
+
new file mode 100644
--- /dev/null
+++ b/mailnews/test/data/smime/alice.plain.sig.SHA256.opaque.dave.sig.SHA256.opaque.eml
@@ -0,0 +1,100 @@
+MIME-Version: 1.0
+From: Dave@example.com
+To: Bob@example.com
+Subject: opaque-signed sig.SHA256 then opaque signed by dave
+Content-Type: application/pkcs7-mime; name=smime.p7m;
+    smime-type=signed-data
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7m
+Content-Description: S/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gNVBAMTC05TUyBUZXN0
+IENBAgEyMHoGCyqGSIb3DQEJEAILMWugaTBkMQswCQYDVQQGEwJVUzETMBEGA1UE
+CBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzESMBAGA1UEChMJ
+Qk9HVVMgTlNTMRQwEgYDVQQDEwtOU1MgVGVzdCBDQQIBMjANBgkqhkiG9w0BAQEF
+AASCAQCoOYW+rMx9xVpNXXBVW1HIyBCPRlNKyHT+7NMjM2+ne8yLTNFb/0WwzWF9
+ktyZiZ/0CLX9xpyUvMOSz0BJkr2mb9knu3ZC0tWCJwHwP4j60fPwKFNaR0MgU0ao
+NzwARZR47I4JKNZ5S8aEazwLsYnGhInCs1tWIa5CSAbh7CBAKd+DGcK4isAPONvM
+s6Yx6SjDuihbTgOcxYKXDbk7jOisnaQUuqzPZL3U4bQ8G5xCor+rgwPo0qUeUuYo
+ISNy2SbMYqv3htxwrcyjuAvk/Cj/D4OwYqUVppYX5aYvo+DiqOA5NmM7xFZd9kVE
+NoqD4ZCIeireQEsroOfwSSBr/3LrAAAAAAAA
+
new file mode 100644
--- /dev/null
+++ b/mailnews/test/data/smime/alice.plain.sig.SHA384.opaque.dave.dsig.SHA384.multipart.eml
@@ -0,0 +1,96 @@
+MIME-Version: 1.0
+From: Dave@example.com
+To: Bob@example.com
+Subject: opaque-signed sig.SHA384 then clear-signed signed by dave
+Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-384; boundary="------------ms010205070902020502030809"
+
+This is a cryptographically signed message in MIME format.
+
+--------------ms010205070902020502030809
+Content-Type: application/pkcs7-mime; name=smime.p7m;
+    smime-type=signed-data
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7m
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgIFADCABgkqhkiG9w0B
+BwGggCSABEdDb250ZW50LVR5cGU6IHRleHQvcGxhaW4NCg0K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x
+t3c9jCHLu3sEAJn3UEqoeg2vWFLldsz9jdIQ4q5qjr2bgQxn8nVx8JqOsfZEBasG
+eKnzYoLkAvFbQtZEorlxDn2909Y4nsvvlA3u6ciVw+xVb7NwvBsoW9Cl9GTfJcG5
+CKEiSEGtjfxCWrAA/JjAGAkQK4tvYzCWAAAAAAAA
+
+--------------ms010205070902020502030809
+Content-Type: application/pkcs7-signature; name=smime.p7s
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7s
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgIFADCABgkqhkiG9w0B
+BwEAAKCCA18wggNbMIICQ6ADAgECAgEyMA0GCSqGSIb3DQEBCwUAMGQxCzAJBgNV
+BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBW
+aWV3MRIwEAYDVQQKEwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBMB4X
+DTE5MDcwMzE4MTAxN1oXDTI0MDcwMzE4MTAxN1owfjELMAkGA1UEBhMCVVMxEzAR
+BgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxEjAQBgNV
+BAoTCUJPR1VTIE5TUzEfMB0GCSqGSIb3DQEJARYQRGF2ZUBleGFtcGxlLmNvbTEN
+MAsGA1UEAxMERGF2ZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMgE
+jtPLuCrJBnIZSo0Ao2Y4MFklSarzBeNAlt/6BJ6gor9aev9VYWkYZwxGzqhb8bi3
+EIbKrNFIEMeZuXTgphy1du/5tGkcWQPwdbgWV+aeg2k4X78frmyNCyZyQU3mbyR+
+5k6Qslbp38Uq/0ZPlxaRkWeBVGirsGl8/zsZCKBDrUq7LBFBinpaGGZAOR1QoJGW
+h69gX79i3Ut9GesJja+6/GFSVpH4Xs/tGYSQmGAvjwsSIBf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TW91bnRhaW4g
+VmlldzESMBAGA1UEChMJQk9HVVMgTlNTMRQwEgYDVQQDEwtOU1MgVGVzdCBDQQIB
+MjANBgkqhkiG9w0BAQEFAASCAQBJ2NBk916cnPVfnJnrGEN6qENVBUOEQ+2oG0VM
+bs3vLkUY405Nt6fV0r8I4xLNfkSS2zX/SZJLi/G86rf7XOkf93igUN5v9amzqOR3
+6aOni3Pst4Gqo/+Q9RqyqhL7wkkMF/GpbRPfL/IMoMn0iLGMZgOVhq7XBv6N/1tr
+TdO+vQsaP/39N4fJSicmne6bHR/xA/VKB/B53guU9mERSYmZ80PSgn4VmSQeLDQi
+JxXh7OUGCaQUHusbAiXOcH/LZjiagxJS5QN/tHAJ+BCDz6//M9pS8YUHMmAydvRr
+nIGyZUyC9DhxFCSamVGEIMJ21edVOdnmvHzV2CVsxB4dvubaAAAAAAAA
+--------------ms010205070902020502030809--
+
new file mode 100644
--- /dev/null
+++ b/mailnews/test/data/smime/alice.plain.sig.SHA384.opaque.dave.sig.SHA384.opaque.eml
@@ -0,0 +1,101 @@
+MIME-Version: 1.0
+From: Dave@example.com
+To: Bob@example.com
+Subject: opaque-signed sig.SHA384 then opaque signed by dave
+Content-Type: application/pkcs7-mime; name=smime.p7m;
+    smime-type=signed-data
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7m
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgIFADCABgkqhkiG9w0B
+BwGggCSABIIKKUNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vcGtjczctbWltZTsg
+bmFtZT1zbWltZS5wN207CiAgICBzbWltZS10eXBlPXNpZ25lZC1kYXRhCkNvbnRl
+bnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJhc2U2NApDb250ZW50LURpc3Bvc2l0aW9u
+OiBhdHRhY2htZW50OyBmaWxlbmFtZT1zbWltZS5wN20KQ29udGVudC1EZXNjcmlw
+dGlvbjogU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MMO7SE
+T+i2BL7z/nORO3aCjtDQYfGUa/DfX0teGrxKH7HIo93XsA9l46UhHPgJgVzKIMfO
+EWL9jUEoFIijAdEdJqqhShUkT93rwnJD/VmRIN+Z7xYVvO0S0nAayXPKG0yjkG5Q
+NztFS8RicpczIb7PtA2M3xsU5AsIXmadPckRUuKwtaeeRki6ETd57e1vvrMkPDWV
+SoX3t5zCyb2DiPLyQWHU1o9AF7cBgFokX/NgxvtbmZHtqglKVfawDg4fdp0Hnmv3
+449lN4tYoDbZAAAAAAAA
+
new file mode 100644
--- /dev/null
+++ b/mailnews/test/data/smime/alice.plain.sig.SHA512.opaque.dave.dsig.SHA512.multipart.eml
@@ -0,0 +1,97 @@
+MIME-Version: 1.0
+From: Dave@example.com
+To: Bob@example.com
+Subject: opaque-signed sig.SHA512 then clear-signed signed by dave
+Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-512; boundary="------------ms010205070902020502030809"
+
+This is a cryptographically signed message in MIME format.
+
+--------------ms010205070902020502030809
+Content-Type: application/pkcs7-mime; name=smime.p7m;
+    smime-type=signed-data
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7m
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgMFADCABgkqhkiG9w0B
+BwGggCSABEdDb250ZW50LVR5cGU6IHRleHQvcGxhaW4NCg0KVGhpcyBpcyBhIHRl
+c3QgbWVzc2FnZSBmcm9tIEFsaWNlIHRvIEJvYi4NCgAAAAAAAKCCA2IwggNeMIIC
+RqADAgECAgEeMA0GCSqGSIb3DQEBCwUAMGQxCzAJBgNVBAYTAlVTMRMwEQYDVQQI
+EwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYDVQQKEwlC
+T0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBMB4XDTE5MDcwMzE4MTAxNFoX
+DTI0MDcwMzE4MTAx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NVBAoTCUJPR1VTIE5TUzEUMBIGA1UE
+AxMLTlNTIFRlc3QgQ0ECAR4wDQYJYIZIAWUDBAIDBQCgggFhMBgGCSqGSIb3DQEJ
+AzELBgkqhkiG9w0BBwEwTwYJKoZIhvcNAQkEMUIEQD19WOnX3C9YP8Tz7gGDkLPi
+v36orVfLbv7L5+nHNhBNFBFfPHvCLJPPifynWat+Sam6uw+JXECk2raOQRrOnyww
+eAYJKwYBBAGCNxAEMWswaTBkMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZv
+cm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzESMBAGA1UEChMJQk9HVVMgTlNT
+MRQwEgYDVQQDEwtOU1MgVGVzdCBDQQIBHjB6BgsqhkiG9w0BCRACCzFroGkwZDEL
+MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDU1vdW50
+YWluIFZpZXcxEjAQBgNVBAoTCUJPR1VTIE5TUzEUMBIGA1UEAxMLTlNTIFRlc3Qg
+Q0ECAR4wDQYJKoZIhvcNAQEBBQAEggEAneEPwdFiGQ4o8gYa6w31ekmLadKI2/4s
+l8/QL+8E1nv//iiCWTZuTFkt6aimj979ZuDYC/K12PwmDbD9YhVCNT4BEDqtCtQ2
+QWfjiRIZjZ/xh0REXlEp9OC0XFQ7oLECfm4afu9jWrFnOOT7Cr+Gw2DHIXlh0coM
+KXYkGgHApsPEb0J4w6KXqL8Sf3xWgf4Fr7kUlQZS/Gj6W9H5S8X0x90jqb1wkluc
+b0FsaRxgwMhwQynsj7qFkyIauLM5ThEvQWPQZFHRmwCBf6M50XcqkhMK7E7doDc5
+kLL8II19G0lZQuUWodFvRdl9E8TY+59zvItVdxuaNvS8d8MDecSulwAAAAAAAA==
+
+--------------ms010205070902020502030809
+Content-Type: application/pkcs7-signature; name=smime.p7s
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7s
+Content-Description: S/MIME Cryptographic Signature
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VUHbesUBbnZg7jcnHA9zOm2Ep6GZvPq+749IDcS7VzNxMPS
+FRvyYLdxa6LQhHYa+Qj2DQ5PbDZld2UAEfE0VhohDjC6ie1/nJm1pDlpuK9BF2hS
+C4QuK92tKPDl6ePHJrRAZmyJgNkuErPiPdssxIY9HSukqnufth/Rtud+hRFs0Mqm
+y1tIVAAAAAAAAA==
+--------------ms010205070902020502030809--
+
new file mode 100644
--- /dev/null
+++ b/mailnews/test/data/smime/alice.plain.sig.SHA512.opaque.dave.sig.SHA512.opaque.eml
@@ -0,0 +1,102 @@
+MIME-Version: 1.0
+From: Dave@example.com
+To: Bob@example.com
+Subject: opaque-signed sig.SHA512 then opaque signed by dave
+Content-Type: application/pkcs7-mime; name=smime.p7m;
+    smime-type=signed-data
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=smime.p7m
+Content-Description: S/MIME Cryptographic Signature
+
+MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgMFADCABgkqhkiG9w0B
+BwGggCSABIIKQUNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vcGtjczctbWltZTsg
+bmFtZT1zbWltZS5wN207CiAgICBzbWltZS10eXBlPXNpZ25lZC1kYXRhCkNvbnRl
+bnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJhc2U2NApDb250ZW50LURpc3Bvc2l0aW9u
+OiBhdHRhY2htZW50OyBmaWxlbmFtZT1zbWltZS5wN20KQ29udGVudC1EZXNjcmlw
+dGlvbjogUy9NSU1FIENyeXB0b2dyYXBoaWMgU2lnbmF0dXJlCgpNSUFHQ1NxR1NJ
+YjNEUUVIQXFDQU1JQUNBUUV4RHpBTkJnbGdoa2dCWlFNRUFnTUZBRENBQmdrcWhr
+aUc5dzBCCkJ3R2dnQ1NBQkVkRGIyNTBaVzUwTFZSNWNHVTZJSFJsZUhRdmNHeGhh
+VzROQ2cwS1ZHaHBjeUJwY3lCaElIUmwKYzNRZ2JXVnpjMkZuWlNCbWNtOXRJRU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
+xHL5FSaDkyVpqEsn7UbEwceRximYcKbAsYEF7YzdhYlooWh1DBDYLA823eJyPY0Z
+mAAAAAAAAA==
+
--- a/mailnews/test/data/smime/alice.sig.SHA1.opaque.eml
+++ b/mailnews/test/data/smime/alice.sig.SHA1.opaque.eml
@@ -8,40 +8,40 @@ Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename=smime.p7m
 Content-Description: S/MIME Cryptographic Signature
 
 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAaCA
 JIAER0NvbnRlbnQtVHlwZTogdGV4dC9wbGFpbg0KDQpUaGlzIGlzIGEgdGVzdCBt
 ZXNzYWdlIGZyb20gQWxpY2UgdG8gQm9iLg0KAAAAAAAAoIIDYjCCA14wggJGoAMC
 AQICAR4wDQYJKoZIhvcNAQELBQAwZDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNh
 bGlmb3JuaWExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxEjAQBgNVBAoTCUJPR1VT
-IE5TUzEUMBIGA1UEAxMLTlNTIFRlc3QgQ0EwHhcNMTkwNzAzMTczMDA3WhcNMjQw
-NzAzMTczMDA3WjCBgDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWEx
+IE5TUzEUMBIGA1UEAxMLTlNTIFRlc3QgQ0EwHhcNMTkwNzAzMTgxMDE0WhcNMjQw
+NzAzMTgxMDE0WjCBgDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWEx
 FjAUBgNVBAcTDU1vdW50YWluIFZpZXcxEjAQBgNVBAoTCUJPR1VTIE5TUzEgMB4G
 CSqGSIb3DQEJARYRQWxpY2VAZXhhbXBsZS5jb20xDjAMBgNVBAMTBUFsaWNlMIIB
-IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4F8PZSndSoPhUMMdVU8cIVqW
-Px1Hg+OUZzfTk7vf8dnwOWJqtoT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VCRuAfcPDc+iX7EK
-5R5WDLEJL/6nLXTn8bi7ysnDUmeocPtyzxXh6vSx30D45WbsuYV1qZbXJGfe3xgM
-yGaYI99VRe2kuduA6rqNstg8MEpyjSTd0pQVekKdQLVWRoOF+7s8v32m4m1noGu6
-jHAsXcbb00Ck1WciSjOswXFCR6xm1o2nAQwzMpMSjclbXvi0epLOJpU2ww7mLG45
-LGMIV4SYMhP0v6sL/UUpmth4piL7OmhEfzXOvmKRxhaHkREdHJK1LUoCjLZ616Uo
-ZhbZrJSMf9uyftdsJXjML++R9Xh22MOqwP1FkejdiLNzqbXJAAAAAAAA
+HjANBgkqhkiG9w0BAQEFAASCAQBpRHBRQNJYMMGDVNUuImpFhRB5MmRKGTXjxe0s
+5cAHYmiZ68xMx/GojvBIL3wUiLqP9zjirO0MVaU1p34g+yUuCh1rCHK+qtnJjnFz
+MJrEV93iSmxzkWn5i3ZarWwYpZ/SU7fDncfTIFIDjhK2IQ44uBaon6OhyUCBSIvE
+d+h6CNOAtN2ZsYEE4FmeZkb6gZv0HL8LYsK8U5rCz+kt8LIUstQowe6PHMPG/qmy
+m239TCD4EkFJYnNhrO2GgZ1T0Kq8AC1B5B4w8FVtnxO7bgs3L4O7Ma305OFD1Ly9
+B4/9He7Cho9tpOr2GMTdBpHix8zu1KAuPTI6Pl0DqkDI/ABHAAAAAAAA
 
--- a/mailnews/test/data/smime/alice.sig.SHA1.opaque.env.eml
+++ b/mailnews/test/data/smime/alice.sig.SHA1.opaque.env.eml
@@ -1,75 +1,75 @@
 MIME-Version: 1.0
 From: Alice@example.com
 To: Bob@example.com
-Subject: enveloped opaque-signed sig.SHA1
+Subject: opaque-signed then enveloped sig.SHA1
 Content-Type: application/pkcs7-mime; name=smime.p7m;
     smime-type=enveloped-data
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename=smime.p7m
 Content-Description: S/MIME Encrypted Message
 
 MIAGCSqGSIb3DQEHA6CAMIACAQAxggGFMIIBgQIBADBpMGQxCzAJB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hgG5f6G4FsLg2JTGiTySRSWGZ7Dtzg0/ZsQR
+WysVDm+tQ2sciodvnBUUic9TwMVtBq1HKkzN4hGj9fPbrxsfbTGm3XFAfZLXrEYt
+kzVnEQ0TppUgV6xUA8Dp8OSohXpZHfUQiDuJXncMLhgooor5vxDwuRpMqMQNz7jV
+WpYcqbm9oQqRVKknovCCxQgrnrVxQnqHkwzUxo9iIntWH+b58iGn+O+vxjVBzXXG
+RpOLdzbc6KSPzEFPpvVip89OXBkE6Wf+pmNedGdDuRhMBCTcHb2fHEiGSbpXSgGc
+5sRUdhXoBta2k6KSKszogJTeJmN769jEl9d78N5T6ww9bU37z+uBUjjaveX1//62
+K7RZi979GexC/OC/MF8EEmbElu1EmDT4n64wtc3azetsMiRh/NTlIZ2sxW8Go+vj
+MOxJEWQD7zYtuVN0GImRmxFIl8u0n/SpZ9c88HT4tZIeftV+x2n/bTCk0vFxfKvJ
+8ZQSfwHhf5VY5fVE9ltHvLsQ0qZii+zMJsPpAu0glAQQ0rwZp+HAuQi0DFjtpnNZ
+ogAAAAAAAAAAAAA=
 
--- a/mailnews/test/data/smime/alice.sig.SHA256.opaque.eml
+++ b/mailnews/test/data/smime/alice.sig.SHA256.opaque.eml
@@ -8,41 +8,41 @@ Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename=smime.p7m
 Content-Description: S/MIME Cryptographic Signature
 
 MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0B
 BwGggCSABEdDb250ZW50LVR5cGU6IHRleHQvcGxhaW4NCg0KVGhpcyBpcyBhIHRl
 c3QgbWVzc2FnZSBmcm9tIEFsaWNlIHRvIEJvYi4NCgAAAAAAAKCCA2IwggNeMIIC
 RqADAgECAgEeMA0GCSqGSIb3DQEBCwUAMGQxCzAJBgNVBAYTAlVTMRMwEQYDVQQI
 EwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYDVQQKEwlC
-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ejHJOtFutZ2NNf2QIWuXQRDV6XATAksy5hG7HZqxZuJM1SKCv89UmS8yX6n
+K30F6Bnh3DglD2/0SBVjhMBo2OWj7mGdfOLZGBjIJjRSlLMlrkF8aq8oaDR2tHDB
+a1Zptn8tCfYTk0SP25O5rVlZ3Nf3dKZeRGzoLVSvRmo4QRBlDQUPmejobqGV1dCZ
+XQcXntWTaykAAAAAAAA=
 
--- a/mailnews/test/data/smime/alice.sig.SHA256.opaque.env.eml
+++ b/mailnews/test/data/smime/alice.sig.SHA256.opaque.env.eml
@@ -1,75 +1,75 @@
 MIME-Version: 1.0
 From: Alice@example.com
 To: Bob@example.com
-Subject: enveloped opaque-signed sig.SHA256
+Subject: opaque-signed then enveloped sig.SHA256
 Content-Type: application/pkcs7-mime; name=smime.p7m;
     smime-type=enveloped-data
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename=smime.p7m
 Content-Description: S/MIME Encrypted Message
 
 MIAGCSqGSIb3DQEHA6CAMIACAQAxggGFMIIBgQIBADBpMGQxCzAJBgNVBAYTAlVT
 MRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIw
 EAYDVQQKEwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBAgEoMA0GCSqG
-SIb3DQEBAQUABIIBAGeaDWAi0Gk2dBO4CvDk+bDDrpvWU10o34S3iYYpH81AM7T5
-NMD/akS4or6Foe9Jw8pQEHfyU5rd/tvJWngW0amuLk/NQWF9DPDthSXWDucPDFkO
-aOVlhW8Ex0+sMC0D9sGIsvhxTLL49UPNx9xxL439svHQh0ouJjcCNpTFwMmB0Whe
-47G7keBwk31beJb9HBjX/WndIrsoTyO0vIuJLF7ZRS7//UJFdgdxyy0mt7/29OpQ
-3YRdNHvNQ86aQC/6mwVsFR8WsUwY6dZKWNXlG+aDRM9BNQ5oUkh80M2APb8lFTTf
-O/RHODYVe1UHnTOHognDDCAtCJtBSqJkz54NlP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GoInhSQrHu2etYNLGx04OCZAPUmV4
+sW9uz61cJUxmiN/mvMYrYdyZFPDiU6zLS/MBiRQnWpDLRLis1Sd4UnZtObQIGiOd
++ez/ahRx/ZkU6uOu2MqKBBAGD37/0McmbCFuJxkbYhNbAAAAAAAAAAAAAA==
 
--- a/mailnews/test/data/smime/alice.sig.SHA384.opaque.eml
+++ b/mailnews/test/data/smime/alice.sig.SHA384.opaque.eml
@@ -8,41 +8,41 @@ Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename=smime.p7m
 Content-Description: S/MIME Cryptographic Signature
 
 MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgIFADCABgkqhkiG9w0B
 BwGggCSABEdDb250ZW50LVR5cGU6IHRleHQvcGxhaW4NCg0KVGhpcyBpcyBhIHRl
 c3QgbWVzc2FnZSBmcm9tIEFsaWNlIHRvIEJvYi4NCgAAAAAAAKCCA2IwggNeMIIC
 RqADAgECAgEeMA0GCSqGSIb3DQEBCwUAMGQxCzAJBgNVBAYTAlVTMRMwEQYDVQQI
 EwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYDVQQKEwlC
-T0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBMB4XDTE5MDcwMzE3MzAwN1oX
-DTI0MDcwMzE3MzAwN1owgYAxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9y
+T0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBMB4XDTE5MDcwMzE4MTAxNFoX
+DTI0MDcwMzE4MTAxNFowgYAxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9y
 bmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYDVQQKEwlCT0dVUyBOU1Mx
 IDAeBgkqhkiG9w0BCQEWEUFsaWNlQGV4YW1wbGUuY29tMQ4wDAYDVQQDEwVBbGlj
-ZTCCASIwDQYJKoZIhvc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BAGA1UE
 ChMJQk9HVVMgTlNTMRQwEgYDVQQDEwtOU1MgVGVzdCBDQQIBHjANBgkqhkiG9w0B
-AQEFAASCAQBZv8VWQ1fJR5CTJm9YJ4Z1ybeVG7xJpZVrcM4/QZ9q9HK4+AkriLhG
-1mIrBWSUV+vrjisPpnv0NHFd+ueRlLufT3aUpaUyobkADT3uYV5CHzQVzmIQeGCF
-Kk7yiGoe6rWmMU/ejb5Qr/iO+132Rdh65IsvYzauvHv4SnT114AK2YwcLdosQLDI
-sx5OwzL817JNCB1R5RH/GTBkYpmtsLJo5APoLuQ+RuWb9h9VTHZ8VXuSx7tTYcrM
-AafavFUhOctbT3uosixXU1YuToP6l8dmto0zgRuIqSc1bu1d+U1WA0kfe0ershPU
-Cg47Smcnd1EvG/BD0ZVF17bT2KC7rwF0AAAAAAAA
+AQEFAASCAQCk4mEuvr1v4R5z9CDdZd9mHTGG8p5oS/Y/rAupCFbC0dlKcWltanh3
+olb7juUdYrGUBYjFWoJhN1GZRt8+vCst/Aj4dCAJgDcqcpaoyVINAZO33iDlUf1N
+MIoN8ACSQ9hQcO/7XM+RisjEO/ydHkzRsHV5hOpMUb5bAD4Oe9o9XR4aPvp0L4nx
+t3c9jCHLu3sEAJn3UEqoeg2vWFLldsz9jdIQ4q5qjr2bgQxn8nVx8JqOsfZEBasG
+eKnzYoLkAvFbQtZEorlxDn2909Y4nsvvlA3u6ciVw+xVb7NwvBsoW9Cl9GTfJcG5
+CKEiSEGtjfxCWrAA/JjAGAkQK4tvYzCWAAAAAAAA
 
--- a/mailnews/test/data/smime/alice.sig.SHA384.opaque.env.eml
+++ b/mailnews/test/data/smime/alice.sig.SHA384.opaque.env.eml
@@ -1,76 +1,76 @@
 MIME-Version: 1.0
 From: Alice@example.com
 To: Bob@example.com
-Subject: enveloped opaque-signed sig.SHA384
+Subject: opaque-signed then enveloped sig.SHA384
 Content-Type: application/pkcs7-mime; name=smime.p7m;
     smime-type=enveloped-data
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename=smime.p7m
 Content-Description: S/MIME Encrypted Message
 
 MIAGCSqGSIb3DQEHA6CAMIACAQAxggGFMIIBgQIBADBpMGQxCzAJBgNVBAYTAlVT
 MRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIw
 EAYDVQQKEwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBAgEoMA0GCSqG
-SIb3DQEBAQUABIIBAHSMKtdp1N+HGipEopGMYkW7/PwNQ3CX6hSQjbIV6AihOt9P
-bX/t6ySafwz57Dd4quYOefeJfqh2gB1tqIfT0Z6WZMe/FTF2LUtp5G29xS/JUM5z
-GwZObf8ohF3Omax8Wh/PKHdk3QTxPM0KG/9SD4io80TtFsmM06g3bQvHfXZXbstw
-aYiNt5WJCLcSELLzzVoA1uwnHy2aBVsgS8FVKAsbK39NXw98ElaaVt8cFzWGEPHE
-riAVvNMeUTTK1dJNH0vYat1XqDEyhQ1+oSFuRn4+bJcqkfWOGT1qpWxH94y9Md3P
-BGtCYngroOWSgYTN8ursrE41zG8rm+4nUb0aJAAwgAYJKoZIhvcNAQcBMB0GCWCG
-SAFlAwQBAgQQCCFIyg+JA2e6KOJoW9C9maCABIIKIJzsV8zIU7U8kPfjVkuQp2j3
-+PvqYBpC7deIll3MUNgfSLcEo+5Ckr5jrcYeoQ//Mdh4IjQBmW/lNHkcLuKeevuz
-hH008H7wiRvpAchsxVR9Yv+z4K9G56v5wckzzBjZ3ufwRGqy8p9tFkiOyc77CvGj
-WtsTWBf/qTPtPARQXALuOniobz8V1/j5jFo3jvC4gNYDdnhsT+dhYl86dkllPzGo
-RrlOmkaOc5vpDr8RcvOgf1R0zD17mhR57kAifuLQS9lGuOZQsi7XaA1uWknRWC3Y
-4zyGRVTHY2xI4b0BXJV7RDcthwBat9E/8AAQiipnl1taFOEBWDNI5okGXoUk1iCk
-USBpc6CpsGNXpn3CeynhQ5ZqSnbe6cD08ygB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E8LzUC/3Y18SFZywHZ6XBiPtiI4fJRg
+921vobEuzPE6nOpaaXJDyIOzOXJwOOZQZSn9M/Zgc6oIHViqqYql6LmoTJxwdURc
+CuXiBeWaljTr9PWPLs6NgDuC5WMkP8cjOiB5yjjGzm3geMeEAf/m8oXbEespxavt
+m0fYADCKBxBo/mwG1cc2zkqTlnt4m2VpP6+wAk8qQKokQg1gQT0T8zBqUJY+lpHA
+0BgtgkquR1TQ6p4ucqCorA0v9ajQjKhTRasuQN9Zp46vHrmXNrcizx1al1Dykw/T
+fUN1PvQBSeZAVZgC2U5KalS2Xfh/dmzL0Tq+g0VLuy1ilvjs0oQllZzud4LyWCxb
+DyvYHjKzs6IySLQF2s4smoWESpiDznToCLcfo8jcRxjvzA2/K/ykgax2HZEVE6ki
+yn2F0nE8Z/yKqAvR4GFMiyyaju7n+ElS7UrKdqoklF4VM251S5zOrenQtMxtyVRa
+9bXpiKVWPrAX50BsF/llD4E5NzCClAgErb2KQD+R0IqX77Oam4MW8GIpxYgaBLjx
+G27GaK2vSZFg9+H3fJRgPqdbuHCImq7sf0ZGEPL4IS/Zjnj2YwW+1pcGZHJifqVO
+QJ5ihhLNuEgYEjvrCaZQ0TqInEarz7DaFvQQTGocsRbHjpT/o4SbXw0PpVF1re5q
+scUfhQRfIjOS+3rJEnJat1lWggyFTOFz5RZBiBEbxAQQtwwu54BuIVKd4KNuDZ9b
+qwAAAAAAAAAAAAA=
 
--- a/mailnews/test/data/smime/alice.sig.SHA512.opaque.eml
+++ b/mailnews/test/data/smime/alice.sig.SHA512.opaque.eml
@@ -8,41 +8,41 @@ Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename=smime.p7m
 Content-Description: S/MIME Cryptographic Signature
 
 MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgMFADCABgkqhkiG9w0B
 BwGggCSABEdDb250ZW50LVR5cGU6IHRleHQvcGxhaW4NCg0KVGhpcyBpcyBhIHRl
 c3QgbWVzc2FnZSB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kz/wAAAAAAAA==
+Q0ECAR4wDQYJKoZIhvcNAQEBBQAEggEAneEPwdFiGQ4o8gYa6w31ekmLadKI2/4s
+l8/QL+8E1nv//iiCWTZuTFkt6aimj979ZuDYC/K12PwmDbD9YhVCNT4BEDqtCtQ2
+QWfjiRIZjZ/xh0REXlEp9OC0XFQ7oLECfm4afu9jWrFnOOT7Cr+Gw2DHIXlh0coM
+KXYkGgHApsPEb0J4w6KXqL8Sf3xWgf4Fr7kUlQZS/Gj6W9H5S8X0x90jqb1wkluc
+b0FsaRxgwMhwQynsj7qFkyIauLM5ThEvQWPQZFHRmwCBf6M50XcqkhMK7E7doDc5
+kLL8II19G0lZQuUWodFvRdl9E8TY+59zvItVdxuaNvS8d8MDecSulwAAAAAAAA==
 
--- a/mailnews/test/data/smime/alice.sig.SHA512.opaque.env.eml
+++ b/mailnews/test/data/smime/alice.sig.SHA512.opaque.env.eml
@@ -1,76 +1,76 @@
 MIME-Version: 1.0
 From: Alice@example.com
 To: Bob@example.com
-Subject: enveloped opaque-signed sig.SHA512
+Subject: opaque-signed then enveloped sig.SHA512
 Content-Type: application/pkcs7-mime; name=smime.p7m;
     smime-type=enveloped-data
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename=smime.p7m
 Content-Description: S/MIME Encrypted Message
 
 MIAGCSqGSIb3DQEHA6CAMIACAQAxggGFMIIBgQIBADBpMGQxCzAJBgNVBAYTAlVT
 MRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIw
 EAYDVQQKEwlCT0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBAgEoMA0GCSqG
-SIb3DQEBAQUABIIBALtXHt8+LK3XzQl5BM+sUqdVHsf9VjSBbUjV9ZKXbBbLESiO
-A87bmxIRFgWBLHporJHY8i2xvdKrJNI2bWRH5Wc5HAkNfo9nBoYhkOAO8RUuCxjn
-ThEX754xwimYjZJ2+XsHYaGrwJ6+jLb6JK3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