diff options
Diffstat (limited to '')
7 files changed, 379 insertions, 0 deletions
diff --git a/comm/mailnews/test/data/smime/alice.dsig.SHA512.multipart b/comm/mailnews/test/data/smime/alice.dsig.SHA512.multipart new file mode 100644 index 0000000000..1960da58a8 --- /dev/null +++ b/comm/mailnews/test/data/smime/alice.dsig.SHA512.multipart @@ -0,0 +1,55 @@ +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; charset=utf-8; format=flowed +Content-Transfer-Encoding: quoted-printable +Content-Language: en-US + +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 +DTE5MDcwMzE3MzAwN1oXDTI0MDcwMzE3MzAwN1owgYAxCzAJBgNVBAYTAlVTMRMw +EQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYD +VQQKEwlCT0dVUyBOU1MxIDAeBgkqhkiG9w0BCQEWEUFsaWNlQGV4YW1wbGUuY29t +MQ4wDAYDVQQDEwVBbGljZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB +AOBfD2Up3UqD4VDDHVVPHCFalj8dR4PjlGc305O73/HZ8DliaraE+jvuRX+N9pD2 +yHYyJt5u0nqNHg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1UEBxMNTW91bnRhaW4gVmlldzESMBAG +A1UEChMJQk9HVVMgTlNTMRQwEgYDVQQDEwtOU1MgVGVzdCBDQQIBHjB6BgsqhkiG +9w0BCRACCzFroGkwZDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWEx +FjAUBgNVBAcTDU1vdW50YWluIFZpZXcxEjAQBgNVBAoTCUJPR1VTIE5TUzEUMBIG +A1UEAxMLTlNTIFRlc3QgQ0ECAR4wDQYJKoZIhvcNAQEBBQAEggEALSlFzzCkvVYr +Gk+i/7YEmZHg5jDewy4bNl/i2FXNaBhu8cgSKTeHVv3/znoDui55TV7mkvzDOiiG +3UDwU0Gig4Inq0LrMPgJnVzMbsYx0eToAkNznPbpWqQi063X6DzulxvcJxUDfmge +x30isoIdRSmsF8nJAj76f64OQqKYNBaZ+RLds4PvdIwHsO3tU+ZZMStqhHlXRb0O +EHxNTUGxC8FsmthIyCUF+Uuy/EKOFEzlD6l/HbxZbg+UZMPF16d73uQdtq6CE5RS +7HR367IHdBgph2kpGFmT7VnqnofVCmM5vBK6TU1Iyd1J5MSLBccGvi5yhQHWpFy2 +oLOutbnYBQAAAAAAAA== +--------------ms030903020902020502030404-- + diff --git a/comm/mailnews/test/data/smime/alice.dsig.SHA512.multipart.bad.eml b/comm/mailnews/test/data/smime/alice.dsig.SHA512.multipart.bad.eml new file mode 100644 index 0000000000..c5ec8af01e --- /dev/null +++ b/comm/mailnews/test/data/smime/alice.dsig.SHA512.multipart.bad.eml @@ -0,0 +1,60 @@ +MIME-Version: 1.0
+Date: Tue, 21 Nov 2023 20:50:06 +0000
+From: Alice@example.com
+To: Bob@example.com
+Subject: BAD 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: text/plain; charset=utf-8; format=flowed
+Content-Transfer-Encoding: quoted-printable
+Content-Language: en-US
+
+This is a FAKE message NOT 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
+DTIzMTEyMTIwNTAzNloXDTI4MTEyMTIwNTAzNlowgYAxCzAJBgNVBAYTAlVTMRMw
+EQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYD
+VQQKEwlCT0dVUyBOU1MxIDAeBgkqhkiG9w0BCQEWEUFsaWNlQGV4YW1wbGUuY29t
+MQ4wDAYDVQQDEwVBbGljZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
+AJ66YRMPyB5Xjh5p6xY6mFjX8K52pJ/VR7yVYgq8jtBjjqUlBS20kwJdOemp4evE
+g76M7lhfmytro7LSlV28uUV/EmHLnNb9c9FjBg69UuX0P3TxJs7oi1ukrOAni35p
+Phd6mj+mBmhC7GaBLOn1HJdxTzDH/NSnWMhZct1Y9rR1RWPEbCVqA/UM61qXFpMc
+i+UQ/Lg7YxjrfowlWdQSeztQPyaMYpO2GbZN+b2daL2KAEO0Ac04e4Koaoog/ZhG
+K8JAquOkgrPsl3mnhdjOrZQ1la4a3jLNs7MJpRSwmXzq/iAMLEoHs+6+rOery0UH
+uTsFoD0UckN90CG7He3Ji90CAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAh0Sv0k33
+8LqiP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QYJKoZIhvcNAQEBBQAEggEAFYqoaQ1WZBzIZr2ETwX9Zj2NU13Cp2HmCfrF
+AagfrDpd3rcuo2q66Eagv7nnEmviP7vV8ouqAHMRr0p3Q+8mS24XbCAKo30mh8/Q
+EaHl6sc42SVwJD9zhAfaMzwqKuN5wUEMYApYtg7xv1aaaWq+mzhC13O5aTjD9168
+tY60cUfGKlcg8qhXbkB4kPEZhsGOESkFfn81sD9Ug1FhQ0apYnjLHvBtwy4Zd2t+
+lmfywK6y8udNRmNDSlinfqF0XLnvmPyMVqZ03QDdCnbCGPzem2Zoq0b4Bv1P8NjK
+KEAW4jBPoy3A2/83gKCyFfllHIX1nlQ12uc3Mb4CqdlxAqeQlgAAAAAAAA==
+--------------ms030903020902020502030404--
+
diff --git a/comm/mailnews/test/data/smime/alice.dsig.SHA512.multipart.eml b/comm/mailnews/test/data/smime/alice.dsig.SHA512.multipart.eml new file mode 100644 index 0000000000..2115292414 --- /dev/null +++ b/comm/mailnews/test/data/smime/alice.dsig.SHA512.multipart.eml @@ -0,0 +1,60 @@ +MIME-Version: 1.0
+Date: Tue, 21 Nov 2023 20:50:06 +0000
+From: Alice@example.com
+To: Bob@example.com
+Subject: 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: text/plain; charset=utf-8; format=flowed
+Content-Transfer-Encoding: quoted-printable
+Content-Language: en-US
+
+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
+BwEAAKCCA2IwggNeMIICRqADAgECAgEeMA0GCSqGSIb3DQEBCwUAMGQxCzAJB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mfywK6y8udNRmNDSlinfqF0XLnvmPyMVqZ03QDdCnbCGPzem2Zoq0b4Bv1P8NjK
+KEAW4jBPoy3A2/83gKCyFfllHIX1nlQ12uc3Mb4CqdlxAqeQlgAAAAAAAA==
+--------------ms030903020902020502030404--
+
diff --git a/comm/mailnews/test/data/smime/alice.dsig.SHA512.multipart.env b/comm/mailnews/test/data/smime/alice.dsig.SHA512.multipart.env Binary files differnew file mode 100644 index 0000000000..2f09f19f96 --- /dev/null +++ b/comm/mailnews/test/data/smime/alice.dsig.SHA512.multipart.env diff --git a/comm/mailnews/test/data/smime/alice.dsig.SHA512.multipart.env.eml b/comm/mailnews/test/data/smime/alice.dsig.SHA512.multipart.env.eml new file mode 100644 index 0000000000..32612a28ca --- /dev/null +++ b/comm/mailnews/test/data/smime/alice.dsig.SHA512.multipart.env.eml @@ -0,0 +1,86 @@ +MIME-Version: 1.0
+Date: Tue, 21 Nov 2023 20:50:06 +0000
+From: Alice@example.com
+To: Bob@example.com
+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
+SIb3DQEBAQUABIIBAIf0ggJUZgsEe+JFBXA/FFd3vFU/K7klhDqTf51UD6kui+TV
+3t6UjkTJJDmbEwOJ4Ma8xE10PNP5nBfk2bbNrR0WJB/dwamlcBLcyQmzhSN6sVji
+QIgrZm5X0uKtXnx18+ffAB71KwL4eB9rYr2UMMvQsCIQXU0TMIHJIUltB2SJiFXM
+WwTm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3CxDAn
+xoBvKCwgI4b71VsUhpb/eiSJDBGRhyBunQArhm8LIAQQnuXpkZPkypYIgw5hsRZZ
+rwAAAAAAAAAAAAA=
+
diff --git a/comm/mailnews/test/data/smime/alice.dsig.SHA512.multipart.mismatch-econtent b/comm/mailnews/test/data/smime/alice.dsig.SHA512.multipart.mismatch-econtent new file mode 100644 index 0000000000..8c4c3741c6 --- /dev/null +++ b/comm/mailnews/test/data/smime/alice.dsig.SHA512.multipart.mismatch-econtent @@ -0,0 +1,56 @@ +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; charset=utf-8; format=flowed +Content-Transfer-Encoding: quoted-printable +Content-Language: en-US + +This is a FAKE message NOT 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 +BwGggCSABEdDb250ZW50LVR5cGU6IHRleHQvcGxhaW4NCg0KVGhpcyBpcyBhIHRl +c3QgbWVzc2FnZSBmcm9tIEFsaWNlIHRvIEJvYi4NCgAAAAAAAKCCA2IwggNeMIIC +RqADAgECAgEeMA0GCSqGSIb3DQEBCwUAMGQxCzAJBgNVBAYTAlVTMRMwEQYDVQQI +EwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYDVQQKEwlC +T0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBMB4XDTE5MDcwMzE3MzAwN1oX +DTI0MDcwMzE3MzAwN1owgYAxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9y +bmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYDVQQKE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ELBgkqhkiG9w0BBwEwTwYJKoZIhvcNAQkEMUIEQD19WOnX3C9YP8Tz7gGDkLPi +v36orVfLbv7L5+nHNhBNFBFfPHvCLJPPifynWat+Sam6uw+JXECk2raOQRrOnyww +eAYJKwYBBAGCNxAEMWswaTBkMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZv +cm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzESMBAGA1UEChMJQk9HVVMgTlNT +MRQwEgYDVQQDEwtOU1MgVGVzdCBDQQIBHjB6BgsqhkiG9w0BCRACCzFroGkwZDEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDU1vdW50 +YWluIFZpZXcxEjAQBgNVBAoTCUJPR1VTIE5TUzEUMBIGA1UEAxMLTlNTIFRlc3Qg +Q0ECAR4wDQYJKoZIhvcNAQEBBQAEggEAoundvRYJ9fHgAVPoxq5Bsv0R0edWrSDU +f3tFwwKG8H7hJwMWtGugVOAUfSimlM4foDwJquqTAdY6JVN798wftuWsXT54zkUS +iB03LpslL7r+gAIa+glmhX6tmLGxIlAa5UyJUHBXoeL3+ze1EoEC+vET5MPh7FnQ +mC9EP7ZaB1yn8z8N/v5KGzDBC2J9ARZoZ7ckon5cxfW9K69dD+ld184cKeWhPPEl +5cspbZc2GqUCT0iyKW7M5wuovyOH4BLoSDyh9FFqKeAsyb4g5eQ3cggTZC+rqx3y +MqxMGaXiLOqxz26zeedkvXI/ZyNeN8zBU9Zo0djCEfCE4GgDw+Kz/wAAAAAAAA== +--------------ms030903020902020502030404-- + diff --git a/comm/mailnews/test/data/smime/alice.dsig.SHA512.multipart.mismatch-econtent.eml b/comm/mailnews/test/data/smime/alice.dsig.SHA512.multipart.mismatch-econtent.eml new file mode 100644 index 0000000000..36e95acc06 --- /dev/null +++ b/comm/mailnews/test/data/smime/alice.dsig.SHA512.multipart.mismatch-econtent.eml @@ -0,0 +1,62 @@ +MIME-Version: 1.0
+Date: Tue, 21 Nov 2023 20:50:06 +0000
+From: Alice@example.com
+To: Bob@example.com
+Subject: BAD mismatch-econtent 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: text/plain; charset=utf-8; format=flowed
+Content-Transfer-Encoding: quoted-printable
+Content-Language: en-US
+
+This is a FAKE message NOT 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
+BwGggCSABEdDb250ZW50LVR5cGU6IHRleHQvcGxhaW4NCg0KVGhpcyBpcyBhIHRl
+c3QgbWVzc2FnZSBmcm9tIEFsaWNlIHRvIEJvYi4NCgAAAAAAAKCCA2IwggNeMIIC
+RqADAgECAgEeMA0GCSqGSIb3DQEBCwUAMGQxCzAJBgNVBAYTAlVTMRMwEQYDVQQI
+EwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYDVQQKEwlC
+T0dVUyBOU1MxFDASBgNVBAMTC05TUyBUZXN0IENBMB4XDTIzMTEyMTIwNTAzNloX
+DTI4MTEyMTIwNTAzNlowgYAxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9y
+bmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRIwEAYDVQQKEwlCT0dVUyBOU1Mx
+IDAeBgkqhkiG9w0BCQEWEUFsaWNlQGV4YW1wbGUuY29tMQ4wDAYDVQQDEwVBbGlj
+ZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ66YRMPyB5Xjh5p6xY6
+mFjX8K52pJ/VR7yVYgq8jtBjjqUlBS20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