summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2016-04-23 23:31:48 -0400
committerKali Kaneko <kali@leap.se>2016-04-23 23:31:48 -0400
commit7aa3fbec050069a715af0407e41dfd2aa5bdd88e (patch)
tree9d3cda94827d36523a7a148787b6e268a5e15fe9
parent2826d7a9300ad75672bee1b8aea6459d6f1cdb3e (diff)
add more samples
-rw-r--r--tests/corpus/expected.A.eml3
-rw-r--r--tests/corpus/sample.B.eml48
-rw-r--r--tests/corpus/sample.C.eml69
-rw-r--r--tests/corpus/sample.D.eml53
-rw-r--r--tests/corpus/sample.E.eml60
-rw-r--r--tests/corpus/sample.F.eml33
-rw-r--r--tests/corpus/sample.H.eml37
7 files changed, 301 insertions, 2 deletions
diff --git a/tests/corpus/expected.A.eml b/tests/corpus/expected.A.eml
index 437f3db..4a6415d 100644
--- a/tests/corpus/expected.A.eml
+++ b/tests/corpus/expected.A.eml
@@ -1,5 +1,4 @@
-Content-Type: multipart/signed; protocol="application/pgp-signature";
- micalg="pgp-sha256"; boundary="cccccccccccc"
+Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="pgp-sha256"; boundary="cccccccccccc"
MIME-Version: 1.0
Date: Thu, 16 Jul 2015 11:44:44 +0200
Subject: alternative text/html message with embedded header, signed
diff --git a/tests/corpus/sample.B.eml b/tests/corpus/sample.B.eml
new file mode 100644
index 0000000..2a2cbc2
--- /dev/null
+++ b/tests/corpus/sample.B.eml
@@ -0,0 +1,48 @@
+Subject: alternative text/html message with embedded header, unsigned
+Message-ID: B@memoryhole.example
+Date: Thu, 16 Jul 2015 11:44:44 +0200
+To: Julia <julia@example.org>
+From: Winston <winston@example.net>
+Content-Type: multipart/mixed; boundary="bbbbbbbbbbbb"
+
+--bbbbbbbbbbbb
+Content-Type: text/rfc822-headers
+Content-Disposition: attachment
+
+Date: Thu, 16 Jul 2015 11:44:44 +0200
+Subject: alternative text/html message with embedded header, unsigned
+From: Winston <winston@example.net>
+To: Julia <julia@example.org>
+Message-ID: B@memoryhole.example
+
+--bbbbbbbbbbbb
+Content-Type: multipart/alternative; boundary="aaaaaaaaaaaa"
+
+--aaaaaaaaaaaa
+Content-Type: text/plain
+
+This is a test
+message on multiple lines
+
+with a silly bit more.
+--
+and a .sig here.
+
+--aaaaaaaaaaaa
+Content-Type: text/html
+
+<html>
+<head>
+<title>titles are usually unrendered</title>
+</head>
+<body>
+<p>This is a test<br/>message on multiple lines</p>
+<p>with a silly bit more.</p>
+<hr/>
+<p>and a .sig here.</p>
+</body>
+</html>
+
+--aaaaaaaaaaaa--
+
+--bbbbbbbbbbbb--
diff --git a/tests/corpus/sample.C.eml b/tests/corpus/sample.C.eml
new file mode 100644
index 0000000..7ace7b0
--- /dev/null
+++ b/tests/corpus/sample.C.eml
@@ -0,0 +1,69 @@
+Subject: the subject has been tampered!
+Message-ID: C@memoryhole.example
+Date: Thu, 16 Jul 2015 11:44:44 +0200
+To: Julia <julia@example.org>
+From: Winston <winston@example.net>
+MIME-Version: 1.0
+Content-Type: multipart/signed; micalg="pgp-sha256";
+ protocol="application/pgp-signature"; boundary="cccccccccccc"
+
+--cccccccccccc
+Content-Type: multipart/mixed; boundary="bbbbbbbbbbbb"
+
+--bbbbbbbbbbbb
+Content-Type: text/rfc822-headers
+Content-Disposition: attachment
+
+Date: Thu, 16 Jul 2015 11:44:44 +0200
+Subject: alternative text/html message with embedded header, signed, with Subject tampered
+From: Winston <winston@example.net>
+To: Julia <julia@example.org>
+Message-ID: C@memoryhole.example
+
+--bbbbbbbbbbbb
+Content-Type: multipart/alternative; boundary="aaaaaaaaaaaa"
+
+--aaaaaaaaaaaa
+Content-Type: text/plain
+
+This is a test
+message on multiple lines
+
+with a silly bit more.
+--
+and a .sig here.
+
+--aaaaaaaaaaaa
+Content-Type: text/html
+
+<html>
+<head>
+<title>titles are usually unrendered</title>
+</head>
+<body>
+<p>This is a test<br/>message on multiple lines</p>
+<p>with a silly bit more.</p>
+<hr/>
+<p>and a .sig here.</p>
+</body>
+</html>
+
+--aaaaaaaaaaaa--
+
+--bbbbbbbbbbbb--
+
+--cccccccccccc
+Content-Type: application/pgp-signature
+
+-----BEGIN PGP SIGNATURE-----
+
+iQEcBAABCAAGBQJWAhj8AAoJEBX7TryOLWy30ZIH/2uQjTofccvTlgCeIyNAcOiO
+1pvhtqbAAx48OPV+oSFo++A1tyVTr8K+J4HZOlVOsQ4QW43sRVYlNF3osbf6qLJT
+QabIcLbCR1u2bbSYOAGP3S0et+05WDf8nWH7wDWaXtILxIaVV1OeHzGt/f+fdGOD
+BO/3GRFS96GSkGJjlLWfVk2usLI98lQ3FcVJoLAXqC/yTN0BoqsFM+A+Gcl3kH6e
+SV6ZRDw/rZMB/nM/mQr0+fl7m4duYXtCRBI6PwYajk2GHsozbY/4+snsfj5r2Y2d
+Pakk8ulxMl6VcX2H0zy/lxwplUvYDhQ/EiysixgYfyp3VblupnLpxpbW6WohsA4=
+=s7OH
+-----END PGP SIGNATURE-----
+
+--cccccccccccc--
diff --git a/tests/corpus/sample.D.eml b/tests/corpus/sample.D.eml
new file mode 100644
index 0000000..a58507a
--- /dev/null
+++ b/tests/corpus/sample.D.eml
@@ -0,0 +1,53 @@
+Subject: Memory Hole Encrypted Message
+Message-ID: D@memoryhole.example
+Date: Thu, 16 Jul 2015 11:44:44 +0200
+To: Julia <julia@example.org>
+From: Winston <winston@example.net>
+MIME-Version: 1.0
+Content-Type: multipart/encrypted; protocol="application/pgp-encrypted";
+ boundary="cccccccccccc"
+
+--cccccccccccc
+Content-Type: application/pgp-encrypted
+
+Version: 1
+--cccccccccccc
+Content-Type: application/octet-stream
+
+-----BEGIN PGP MESSAGE-----
+
+hQEMA5I+4kg3RI5lAQgAhdyAjw+gHuwQQptwKQhmudVcmoz5cmNtIlHkfNj4wNvA
+N8f5pegNwNw+cx9yyV2fH+XjIbjws+jIdmlhIrE6B1uQgZy10CQkiGOdyUfwSvCW
+iJM8WUsvQo1uQ9YfkdQee4o+n5SseceCLO/vEZyq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ZPuBSngb9lPIybhg2KsSbl9Lmz+Hc/Mhl2pCYi4jAYy4xkQLayloffghF1CeaWp
+b9pWpP/2niVQD1OxhkE1It2dQVoM2wWc8TJV8JEVbTKsfOVTULyGylFgIb48h/sM
+EffmNgz25QF7PdCI3GJbJt3Ea9CltPxGSXh9kqCmbap7dLXeWL4Fd6c8gxsK78Ls
+wOV/7s1WuonNYdUcEMK1BdtRJp+q9wRr0XQrPvtRnMrPPfQp6SKnqD8LV23vRrSZ
+EhzZ4t9lohe9EaQwotclmJuSG89kysr9zrhX3T7nVTFVgcWmLRZbTi9LYLZFutZ5
+pvZXlnDgDXdnb9Li1N5yMW4ns7KsNE/49N2iFRWdJqAt0iTFJGz5RbNmMwMQYks7
+Uj0dO6+6dZbhqabCyGcwDIgFoBVcSw5SObMSpBAU7kBcgnsqv2tNEWy6xUqQetrF
+9LZpJzO/9ptER97n81Ys6KSplUM1ybkW8HNzvNmohXkKAl7sKNxXwtLDR95LGhW8
+RUE+4lGBl+PFF5SOy58IpLVXfzUUFviX7hYHNZDpYKoA8/1Sps46YLVThmRUpMCl
+lzzvYXHbsLaJyEFkrTEwyWPI3AkclcoLjP5Z16V/WCfm4C56oAgFibtWs52ZLnAp
+KGU5hEpslCiLsCCnv3y/cLvJXKL6qJe0xNsKmv2sr7zGu+Pj2t6n4XNAQnaij83P
+yBjDZ9EATzeP4gxZio26plWOYwnyPXaVscf32lGNYrt4BtbxFlbO
+=DQNT
+-----END PGP MESSAGE-----
+
+--cccccccccccc--
diff --git a/tests/corpus/sample.E.eml b/tests/corpus/sample.E.eml
new file mode 100644
index 0000000..75219c1
--- /dev/null
+++ b/tests/corpus/sample.E.eml
@@ -0,0 +1,60 @@
+Subject: Memory Hole Encrypted Message
+Message-ID: E@memoryhole.example
+Date: Thu, 16 Jul 2015 11:44:44 +0200
+To: Julia <julia@example.org>
+From: Winston <winston@example.net>
+MIME-Version: 1.0
+Content-Type: multipart/encrypted; protocol="application/pgp-encrypted";
+ boundary="cccccccccccc"
+
+--cccccccccccc
+Content-Type: application/pgp-encrypted
+
+Version: 1
+--cccccccccccc
+Content-Type: application/octet-stream
+
+-----BEGIN PGP MESSAGE-----
+
+hQEMA5I+4kg3RI5lAQf+N4w5DfQtmarRpPzN1VIywhwidoqRLLi18I9faS5ue/r0
+sFeeAl8LsVhi5QoFCr84f5bGq62k+VOgZsqoEXGXubh+GHXuxWVLo9Y71K5gcuTP
+TB3Fag55wrf8ady9f73Qhq/AXmAH5nCV/rslR1HncPuS6R1IaSSrfuAlcvmNAvRX
+WpDa3QhbJeugMyqh+TmQbjc5srO+Z1orQHr9RtZMPd7uepH9owIy6HycZkAAjQtS
+v80N+H/bAyr8OsBcfkiEFkVbYd/tRpuINAO9S/qxhCmf1bw2+Kntg9pGY2TG7IQo
+niWg1J+m/S6hLj0OtfgwQeQdCziMFzn66xdfbgyV+YUBDANLbJvEVDbKBwEH/Ran
+9pxVfymMPMF0yJ4voM/p318PYnKSx1xKhfr6eaGwEqbzdEVJtCWXDuMDzvKQTYwS
+7hcz7qRYkbo1YvKhO6UOxqwSn7CHcorAj/XMOt7kxKyXpXC5UH+ECE8dgyvnagyY
+T3MOJ28CDOiJfTPpxuiL7rnv+xconPPjRjaoNokMyUaAcbaFvqUORuTwuxGfSULN
+r4c3Fgo+hXCOa9xKssWdrN7q4YWnIPU+/iEih+FevpODU7D+YLCKSSNBd0gztMAu
+IUmtXMTyfIzbkH9WWTrZXOY5MWp5Er6NYpNvemJQsfqwO4lrKAFdp7uDulO5meUD
+q1PYbMFqUYhNJmJM4PfS6gFr983SQ7GQDuWN1iNNOD+b7X6kjj5ZYEKsnhrj7BiN
+lpx3/+bHQiyDkXbBaC51yWXqaumhjhWQSNjCChzH2MxbvlXbu1wjFozWh6f1Y8Xd
+hfL0aZZ2nPGrtEG/xZbOo2oG3ua+sImsjt6cPrL3xqtFhF7xhpkkF2wDCZ8B79JQ
+lSiapSOFMYNwn6dtSxLGD1EwNMOWHF4pqW9IHqpv7eXLCA81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RfC00V72VwkLviQZkceCqrn7/mps/m4MFyHdaPXYKt3glNW3wkq
+n0CgpdKHA0VE4Ll6FHDxroafAN8Es63mnrH07YuUH7LAEZyj8wyVSuUHrI7Ustfa
+JssfSBgSZaErOPBe3Q4Sojdqn0fuBHeUZYIoE1qrlOrjo68yYpwnHEMRNFVXP8+J
+xrJ75qWdUwe/NeS23pza5jTPSQY1z+eNwpYFproeGASqHskwjaqErnBr3uqMtsqM
+iUYyN/9l4DAWICxACeVcP24r0H60bRSqg/sHNiz5cDDhTvyFeTpYrurJ8Bb9vKGu
+wz5/lqAupu5fENPWOoqOyBX0VNyNXX1JMC2ohaPrNGU/Fp6TTcYzTJrVx3/7mWgN
+VSNn
+=QBls
+-----END PGP MESSAGE-----
+
+--cccccccccccc--
diff --git a/tests/corpus/sample.F.eml b/tests/corpus/sample.F.eml
new file mode 100644
index 0000000..7b52bb7
--- /dev/null
+++ b/tests/corpus/sample.F.eml
@@ -0,0 +1,33 @@
+Subject: headers in top-level MIME object: signed plaintext email
+Message-ID: F@memoryhole.example
+Date: Wed, 29 Jul 2015 09:31:44 +0100
+To: Julia <julia@example.org>
+From: Winston <winston@example.net>
+MIME-Version: 1.0
+Content-Type: multipart/signed; micalg="pgp-sha256";
+ protocol="application/pgp-signature"; boundary="bbbbbbbbbbbb"
+
+--bbbbbbbbbbbb
+Content-Type: text/plain; boundary="aaaaaaaaaaaa"
+Subject: headers in top-level MIME object: signed plaintext email
+From: Winston <winston@example.net>
+
+This message demonstrates including the memoryhole headers inside the
+top-level MIME object. The signed Subject and From are headers of the
+text/plain part, rather than having their own rfc822-headers part.
+
+--bbbbbbbbbbbb
+Content-Type: application/pgp-signature
+
+-----BEGIN PGP SIGNATURE-----
+
+iQEcBAABCAAGBQJWAhj8AAoJEBX7TryOLWy3nk0IAJKhfEHFfKDrwdmv4J+Q+zCa
+H0rkZgEpbYegFpMP72c85NTb85nv36opyommNplGKSWAzUvE48+MYBdBzYDRhFgd
+baWkAymG2uhhxK2ApjeRYKS//ihV7saanxEwPTwhpMc0fDUojfbkDw6EpT9Weana
+mhjepOcz0wzOSeLmZApWs7kApjuLKYl5UMpZNWN67o95p0FMBo28S624itVbPj3a
+icF868O5D/diYFbjlnys1V4lpiSKk7fMts3c+3KVkKClPj93mWwiJOgDbGkc49+2
+xELU1m2apzsvAVydZWMz1NFgyiOGRTZCAfAxbH/I+WZ6hSCrlDga5Hzs8ELmT3I=
+=0FlB
+-----END PGP SIGNATURE-----
+
+--bbbbbbbbbbbb--
diff --git a/tests/corpus/sample.H.eml b/tests/corpus/sample.H.eml
new file mode 100644
index 0000000..7d36cfd
--- /dev/null
+++ b/tests/corpus/sample.H.eml
@@ -0,0 +1,37 @@
+Subject: headers in top-level MIME: tampered subject and from
+Message-ID: H@memoryhole.example
+Date: Wed, 29 Jul 2015 09:31:44 +0100
+To: Julia <julia@example.org>
+From: Eve <eve@evilcorp.com>
+MIME-Version: 1.0
+Content-Type: multipart/signed; micalg="pgp-sha256";
+ protocol="application/pgp-signature"; boundary="bbbbbbbbbbbb"
+
+--bbbbbbbbbbbb
+Content-Type: text/plain; boundary="aaaaaaaaaaaa"
+Subject: headers in top-level MIME: subject restored to original
+From: Winston <winston@example.net>
+
+This email demonstrates including the memoryhole headers inside the
+top-level MIME object. The signed Subject and From are headers of the
+text/plain part, rather than having their own rfc822-headers part.
+
+This email has been tampered with. It was originally sent by Winston,
+who signed the body (including the memoryhole headers). Eve has
+fiddled with the From and Subject headers in-flight.
+
+--bbbbbbbbbbbb
+Content-Type: application/pgp-signature
+
+-----BEGIN PGP SIGNATURE-----
+
+iQEcBAABCAAGBQJWAhj9AAoJEBX7TryOLWy3YZUIAIBNrsi3ukLN2S12SNMxu0n0
+FyHWokwibCljlmArbSaGT7b7mPQFN42CkRsomskk1JzptIetEHxwSH+sNlV/EK3J
+kEYuOnVayH/UaujFCAv4qCtKHapjcIgRBrieX/AjLWJvSDXQq1x42SurHnLyH2Hw
+aMffIcJ8jhs5JDINqUcZZRxykK9Ub53SEAOTiqqPjpt4O40WPCe0tXqPO3iB0JIk
+DqMScWL4dJHtnk0U2g5wEZ8PdEN9iwhKnJ0yC+9FTkisK7vEdluTSxBV3xtyeOsq
+G8ZgpoG7NnF0jJf67O7sD3lSc0jAtBAalKDBtQXMYtQ2unyJULqa7mZzMBIdjDA=
+=mE6O
+-----END PGP SIGNATURE-----
+
+--bbbbbbbbbbbb--