From f870fea07623c1cebaddd9d6c650156d39334093 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 10 Jul 2014 14:08:42 -0700 Subject: [PATCH] Added unit tests for canonicalization and fixed several bugs therein --- flanker/dkim.py | 50 +++++++++++++++---- tests/dkim_test.py | 43 ++++++++++++++++ tests/fixtures/messages/dkim/README | 23 +++++++++ tests/fixtures/messages/dkim/email.01 | 0 tests/fixtures/messages/dkim/email.02 | 1 + tests/fixtures/messages/dkim/email.03 | 2 + tests/fixtures/messages/dkim/email.04 | 3 ++ tests/fixtures/messages/dkim/email.05 | 4 ++ tests/fixtures/messages/dkim/email.06 | 5 ++ tests/fixtures/messages/dkim/email.07 | 4 ++ tests/fixtures/messages/dkim/email.08 | 4 ++ tests/fixtures/messages/dkim/email.09 | 5 ++ tests/fixtures/messages/dkim/email.10 | 5 ++ tests/fixtures/messages/dkim/email.11 | 5 ++ tests/fixtures/messages/dkim/email.12 | 6 +++ tests/fixtures/messages/dkim/email.13 | 8 +++ tests/fixtures/messages/dkim/email.14 | 5 ++ tests/fixtures/messages/dkim/email.19 | 15 ++++++ tests/fixtures/messages/dkim/email.20 | 5 ++ tests/fixtures/messages/dkim/email.21 | 6 +++ tests/fixtures/messages/dkim/email.22 | 14 ++++++ tests/fixtures/messages/dkim/email.23 | 16 ++++++ tests/fixtures/messages/dkim/email.24 | 22 ++++++++ tests/fixtures/messages/dkim/email.25 | 17 +++++++ .../fixtures/messages/dkim/nofws.expected.01 | 0 .../fixtures/messages/dkim/nofws.expected.02 | 1 + .../fixtures/messages/dkim/nofws.expected.03 | 1 + .../fixtures/messages/dkim/nofws.expected.04 | 3 ++ .../fixtures/messages/dkim/nofws.expected.05 | 3 ++ .../fixtures/messages/dkim/nofws.expected.06 | 3 ++ .../fixtures/messages/dkim/nofws.expected.07 | 3 ++ .../fixtures/messages/dkim/nofws.expected.08 | 3 ++ .../fixtures/messages/dkim/nofws.expected.09 | 5 ++ .../fixtures/messages/dkim/nofws.expected.10 | 5 ++ .../fixtures/messages/dkim/nofws.expected.11 | 5 ++ .../fixtures/messages/dkim/nofws.expected.12 | 6 +++ .../fixtures/messages/dkim/nofws.expected.13 | 6 +++ .../fixtures/messages/dkim/nofws.expected.14 | 5 ++ .../fixtures/messages/dkim/nofws.expected.19 | 11 ++++ .../fixtures/messages/dkim/nofws.expected.20 | 4 ++ .../fixtures/messages/dkim/nofws.expected.21 | 4 ++ .../fixtures/messages/dkim/nofws.expected.22 | 7 +++ .../fixtures/messages/dkim/nofws.expected.23 | 9 ++++ .../fixtures/messages/dkim/nofws.expected.24 | 5 ++ .../fixtures/messages/dkim/nofws.expected.25 | 7 +++ tests/fixtures/messages/dkim/purpose.01 | 1 + tests/fixtures/messages/dkim/purpose.02 | 1 + tests/fixtures/messages/dkim/purpose.03 | 1 + tests/fixtures/messages/dkim/purpose.04 | 1 + tests/fixtures/messages/dkim/purpose.05 | 1 + tests/fixtures/messages/dkim/purpose.06 | 1 + tests/fixtures/messages/dkim/purpose.07 | 1 + tests/fixtures/messages/dkim/purpose.08 | 1 + tests/fixtures/messages/dkim/purpose.09 | 1 + tests/fixtures/messages/dkim/purpose.10 | 1 + tests/fixtures/messages/dkim/purpose.11 | 1 + tests/fixtures/messages/dkim/purpose.12 | 1 + tests/fixtures/messages/dkim/purpose.13 | 3 ++ tests/fixtures/messages/dkim/purpose.14 | 1 + tests/fixtures/messages/dkim/purpose.19 | 1 + tests/fixtures/messages/dkim/purpose.20 | 3 ++ tests/fixtures/messages/dkim/purpose.21 | 3 ++ tests/fixtures/messages/dkim/purpose.22 | 3 ++ tests/fixtures/messages/dkim/purpose.23 | 4 ++ tests/fixtures/messages/dkim/purpose.24 | 1 + tests/fixtures/messages/dkim/purpose.25 | 1 + .../fixtures/messages/dkim/simple.expected.01 | 0 .../fixtures/messages/dkim/simple.expected.02 | 3 ++ .../fixtures/messages/dkim/simple.expected.03 | 3 ++ .../fixtures/messages/dkim/simple.expected.04 | 3 ++ .../fixtures/messages/dkim/simple.expected.05 | 3 ++ .../fixtures/messages/dkim/simple.expected.06 | 3 ++ .../fixtures/messages/dkim/simple.expected.07 | 4 ++ .../fixtures/messages/dkim/simple.expected.08 | 4 ++ .../fixtures/messages/dkim/simple.expected.09 | 5 ++ .../fixtures/messages/dkim/simple.expected.10 | 5 ++ .../fixtures/messages/dkim/simple.expected.11 | 5 ++ .../fixtures/messages/dkim/simple.expected.12 | 6 +++ .../fixtures/messages/dkim/simple.expected.13 | 8 +++ .../fixtures/messages/dkim/simple.expected.14 | 5 ++ .../fixtures/messages/dkim/simple.expected.19 | 14 ++++++ .../fixtures/messages/dkim/simple.expected.20 | 5 ++ .../fixtures/messages/dkim/simple.expected.21 | 6 +++ .../fixtures/messages/dkim/simple.expected.22 | 14 ++++++ .../fixtures/messages/dkim/simple.expected.23 | 16 ++++++ .../fixtures/messages/dkim/simple.expected.24 | 22 ++++++++ .../fixtures/messages/dkim/simple.expected.25 | 14 ++++++ 87 files changed, 533 insertions(+), 11 deletions(-) create mode 100644 tests/fixtures/messages/dkim/README create mode 100644 tests/fixtures/messages/dkim/email.01 create mode 100644 tests/fixtures/messages/dkim/email.02 create mode 100644 tests/fixtures/messages/dkim/email.03 create mode 100644 tests/fixtures/messages/dkim/email.04 create mode 100644 tests/fixtures/messages/dkim/email.05 create mode 100644 tests/fixtures/messages/dkim/email.06 create mode 100644 tests/fixtures/messages/dkim/email.07 create mode 100644 tests/fixtures/messages/dkim/email.08 create mode 100644 tests/fixtures/messages/dkim/email.09 create mode 100644 tests/fixtures/messages/dkim/email.10 create mode 100644 tests/fixtures/messages/dkim/email.11 create mode 100644 tests/fixtures/messages/dkim/email.12 create mode 100644 tests/fixtures/messages/dkim/email.13 create mode 100644 tests/fixtures/messages/dkim/email.14 create mode 100644 tests/fixtures/messages/dkim/email.19 create mode 100644 tests/fixtures/messages/dkim/email.20 create mode 100644 tests/fixtures/messages/dkim/email.21 create mode 100644 tests/fixtures/messages/dkim/email.22 create mode 100644 tests/fixtures/messages/dkim/email.23 create mode 100644 tests/fixtures/messages/dkim/email.24 create mode 100644 tests/fixtures/messages/dkim/email.25 create mode 100644 tests/fixtures/messages/dkim/nofws.expected.01 create mode 100644 tests/fixtures/messages/dkim/nofws.expected.02 create mode 100644 tests/fixtures/messages/dkim/nofws.expected.03 create mode 100644 tests/fixtures/messages/dkim/nofws.expected.04 create mode 100644 tests/fixtures/messages/dkim/nofws.expected.05 create mode 100644 tests/fixtures/messages/dkim/nofws.expected.06 create mode 100644 tests/fixtures/messages/dkim/nofws.expected.07 create mode 100644 tests/fixtures/messages/dkim/nofws.expected.08 create mode 100644 tests/fixtures/messages/dkim/nofws.expected.09 create mode 100644 tests/fixtures/messages/dkim/nofws.expected.10 create mode 100644 tests/fixtures/messages/dkim/nofws.expected.11 create mode 100644 tests/fixtures/messages/dkim/nofws.expected.12 create mode 100644 tests/fixtures/messages/dkim/nofws.expected.13 create mode 100644 tests/fixtures/messages/dkim/nofws.expected.14 create mode 100644 tests/fixtures/messages/dkim/nofws.expected.19 create mode 100644 tests/fixtures/messages/dkim/nofws.expected.20 create mode 100644 tests/fixtures/messages/dkim/nofws.expected.21 create mode 100644 tests/fixtures/messages/dkim/nofws.expected.22 create mode 100644 tests/fixtures/messages/dkim/nofws.expected.23 create mode 100644 tests/fixtures/messages/dkim/nofws.expected.24 create mode 100644 tests/fixtures/messages/dkim/nofws.expected.25 create mode 100644 tests/fixtures/messages/dkim/purpose.01 create mode 100644 tests/fixtures/messages/dkim/purpose.02 create mode 100644 tests/fixtures/messages/dkim/purpose.03 create mode 100644 tests/fixtures/messages/dkim/purpose.04 create mode 100644 tests/fixtures/messages/dkim/purpose.05 create mode 100644 tests/fixtures/messages/dkim/purpose.06 create mode 100644 tests/fixtures/messages/dkim/purpose.07 create mode 100644 tests/fixtures/messages/dkim/purpose.08 create mode 100644 tests/fixtures/messages/dkim/purpose.09 create mode 100644 tests/fixtures/messages/dkim/purpose.10 create mode 100644 tests/fixtures/messages/dkim/purpose.11 create mode 100644 tests/fixtures/messages/dkim/purpose.12 create mode 100644 tests/fixtures/messages/dkim/purpose.13 create mode 100644 tests/fixtures/messages/dkim/purpose.14 create mode 100644 tests/fixtures/messages/dkim/purpose.19 create mode 100644 tests/fixtures/messages/dkim/purpose.20 create mode 100644 tests/fixtures/messages/dkim/purpose.21 create mode 100644 tests/fixtures/messages/dkim/purpose.22 create mode 100644 tests/fixtures/messages/dkim/purpose.23 create mode 100644 tests/fixtures/messages/dkim/purpose.24 create mode 100644 tests/fixtures/messages/dkim/purpose.25 create mode 100644 tests/fixtures/messages/dkim/simple.expected.01 create mode 100644 tests/fixtures/messages/dkim/simple.expected.02 create mode 100644 tests/fixtures/messages/dkim/simple.expected.03 create mode 100644 tests/fixtures/messages/dkim/simple.expected.04 create mode 100644 tests/fixtures/messages/dkim/simple.expected.05 create mode 100644 tests/fixtures/messages/dkim/simple.expected.06 create mode 100644 tests/fixtures/messages/dkim/simple.expected.07 create mode 100644 tests/fixtures/messages/dkim/simple.expected.08 create mode 100644 tests/fixtures/messages/dkim/simple.expected.09 create mode 100644 tests/fixtures/messages/dkim/simple.expected.10 create mode 100644 tests/fixtures/messages/dkim/simple.expected.11 create mode 100644 tests/fixtures/messages/dkim/simple.expected.12 create mode 100644 tests/fixtures/messages/dkim/simple.expected.13 create mode 100644 tests/fixtures/messages/dkim/simple.expected.14 create mode 100644 tests/fixtures/messages/dkim/simple.expected.19 create mode 100644 tests/fixtures/messages/dkim/simple.expected.20 create mode 100644 tests/fixtures/messages/dkim/simple.expected.21 create mode 100644 tests/fixtures/messages/dkim/simple.expected.22 create mode 100644 tests/fixtures/messages/dkim/simple.expected.23 create mode 100644 tests/fixtures/messages/dkim/simple.expected.24 create mode 100644 tests/fixtures/messages/dkim/simple.expected.25 diff --git a/flanker/dkim.py b/flanker/dkim.py index 9630f41..efdb78e 100644 --- a/flanker/dkim.py +++ b/flanker/dkim.py @@ -20,7 +20,7 @@ class SimpleCanonicalization(object): return header, value def canonicalize_body(self, body): - return body.rstrip() + "\r\n" + return body.rstrip("\r\n") + "\r\n" class NoFWSCanonicalization(object): @@ -33,7 +33,7 @@ class NoFWSCanonicalization(object): def canonicalize_body(self, body): body = self._body_wsp_re.sub("", body) - body = self._body_orphan_cr_re.sub("\1", body) + body = self._body_orphan_cr_re.sub(r"\1", body) body = body.rstrip() return body + "\r\n" if body else "" @@ -67,12 +67,13 @@ class DomainKeySigner(object): self._signed_headers = None def sign(self, message): - message = io.BytesIO(_BODY_LINES_RE.sub("\r\n", message)) canonicalization = NoFWSCanonicalization() signer = self._key.signer(padding.PKCS1v15(), hashes.SHA1()) + + headers, body = rfc822_parse(message) + h_field = [] - for header_line in parsing.split(message): - header, value = header_line.split(b":", 1) + for header, value in headers: if self._signed_headers is None or header in self._signed_headers: h_field.append(header) @@ -81,8 +82,7 @@ class DomainKeySigner(object): signer.update(header) signer.update(b":") signer.update(value) - m = message.read() - body = canonicalization.canonicalize_body(m) + body = canonicalization.canonicalize_body(body) if body: signer.update(b"\r\n") signer.update(body) @@ -113,12 +113,11 @@ class DKIMSigner(object): if current_time is None: current_time = int(time.time()) - message = io.BytesIO(_BODY_LINES_RE.sub("\r\n", message)) signer = self._key.signer(padding.PKCS1v15(), hashes.SHA256()) + headers, body = rfc822_parse(message) h_field = [] - for header_line in parsing.split(message): - header, value = header_line.split(b":", 1) + for header, value in headers: if self._signed_headers is None or header in self._signed_headers: h_field.append(header) @@ -129,7 +128,7 @@ class DKIMSigner(object): signer.update(v) h = hashes.Hash(hashes.SHA256(), backend=default_backend()) - h.update(self._body_canonicalization.canonicalize_body(message.read())) + h.update(self._body_canonicalization.canonicalize_body(body)) dkim_header_value = _fold( b" a=rsa-sha256; v=1; " b"c={header_canonicalization.name}/{body_canonicalization.name}; " @@ -154,3 +153,32 @@ class DKIMSigner(object): dkim_header=v, signature=_fold(base64.b64encode(signer.finalize())) ) + +_RFC822_NEWLINE_RE = re.compile(r"\r?\n") +_RFC822_WS_RE = re.compile(r"[\x09\x20]") +_RFC822_HEADER_RE = re.compile(r"([\x21-\x7e]+?):") + +def rfc822_parse(message): + headers = [] + lines = _RFC822_NEWLINE_RE.split(message) + i = 0 + while i < len(lines): + if len(lines[i]) == 0: + # End of headers, return what we have plus the body, excluding the + # blank line. + i += 1 + break + if _RFC822_WS_RE.match(lines[i][0]): + headers[-1][1] += lines[i] + "\r\n" + else: + m = _RFC822_HEADER_RE.match(lines[i]) + if m is not None: + headers.append([m.group(1), lines[i][m.end(0):] + "\r\n"]) + elif lines[i].startswith("From "): + pass + else: + raise ValueError( + "Unexpected characters in RFC822 header: %s" % lines[i] + ) + i += 1 + return (headers, "\r\n".join(lines[i:])) diff --git a/tests/dkim_test.py b/tests/dkim_test.py index 0a18a24..57b943f 100644 --- a/tests/dkim_test.py +++ b/tests/dkim_test.py @@ -1,9 +1,14 @@ +import glob +import io +import os + from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import serialization from nose.tools import assert_equal from flanker import dkim +from flanker.mime.message.headers import parsing DUMMY_EMAIL = b""" @@ -64,3 +69,41 @@ def test_simple_dkim_signature(): b"Jxf4OJGbWVXwSB2mNPfPyScpqJEL+z43vhx+/ZTWBWpj3TSAuHmOT4G7wrySLAZmfDcm" b"je\r\n J00EP9NPpJOz2oUI8NJwozkUr6k=\r\n" ) + + +def test_canonicalization(): + path = os.path.join( + os.path.dirname(__file__), "fixtures", "messages", "dkim", "email.*" + ) + for path in glob.glob(path): + if path.endswith(".01"): + continue + with open(path) as f: + contents = f.read() + with open(path.replace("email", "nofws.expected")) as f: + nofws_contents = f.read() + with open(path.replace("email", "simple.expected")) as f: + simple_contents = f.read() + + assert_equal( + canonicalize_contents(dkim.NoFWSCanonicalization(), contents), + nofws_contents + ) + assert_equal( + canonicalize_contents(dkim.SimpleCanonicalization(), contents), + simple_contents + ) + + +def canonicalize_contents(canonicalization_rule, contents): + headers, body = dkim.rfc822_parse(contents) + output = io.BytesIO() + for header, value in headers: + header, value = canonicalization_rule.canonicalize_header( + header, value) + output.write(b"{h}:{v}".format(h=header, v=value)) + body = canonicalization_rule.canonicalize_body(body) + if body: + output.write(b"\r\n") + output.write(body) + return output.getvalue() diff --git a/tests/fixtures/messages/dkim/README b/tests/fixtures/messages/dkim/README new file mode 100644 index 0000000..d0d3703 --- /dev/null +++ b/tests/fixtures/messages/dkim/README @@ -0,0 +1,23 @@ +This set of tests are intended to exercise your canonicalization +code. The test files contain content that represents statements or +actions in the DK specification. In particular, whitespace and +continuation requirements are exercised. + +Each canonicalization test consists of the following files: + +email.* The original email +nofws.expected.* The nofws canonicalized output +simple.expected.* The simple canonicalized output +purpose.* What this particular test is exercising + +If you have a program that exercises your canonicalization routines, +then you can probably modify the run_tests script to exercise your +program and compare the results automatically. + +The run_tests scripts assumes a program that takes the +canonicalization algorithm as argument one, the input file from STDIN +and writes the canonicalized text to STDOUT. It's a simple-minded +script, hack as you see fit. + +Alternatively, run your canonicalization program such that it creates +a file that you can diff against the *.expected.* files. diff --git a/tests/fixtures/messages/dkim/email.01 b/tests/fixtures/messages/dkim/email.01 new file mode 100644 index 0000000..e69de29 diff --git a/tests/fixtures/messages/dkim/email.02 b/tests/fixtures/messages/dkim/email.02 new file mode 100644 index 0000000..4ccea2c --- /dev/null +++ b/tests/fixtures/messages/dkim/email.02 @@ -0,0 +1 @@ +From: diff --git a/tests/fixtures/messages/dkim/email.03 b/tests/fixtures/messages/dkim/email.03 new file mode 100644 index 0000000..1714f01 --- /dev/null +++ b/tests/fixtures/messages/dkim/email.03 @@ -0,0 +1,2 @@ +From: + diff --git a/tests/fixtures/messages/dkim/email.04 b/tests/fixtures/messages/dkim/email.04 new file mode 100644 index 0000000..73fdd76 --- /dev/null +++ b/tests/fixtures/messages/dkim/email.04 @@ -0,0 +1,3 @@ +From: + +A single line of body text diff --git a/tests/fixtures/messages/dkim/email.05 b/tests/fixtures/messages/dkim/email.05 new file mode 100644 index 0000000..b3360ea --- /dev/null +++ b/tests/fixtures/messages/dkim/email.05 @@ -0,0 +1,4 @@ +From: + +A single line of body text + diff --git a/tests/fixtures/messages/dkim/email.06 b/tests/fixtures/messages/dkim/email.06 new file mode 100644 index 0000000..1ed00ed --- /dev/null +++ b/tests/fixtures/messages/dkim/email.06 @@ -0,0 +1,5 @@ +From: + +A single line of body text + + diff --git a/tests/fixtures/messages/dkim/email.07 b/tests/fixtures/messages/dkim/email.07 new file mode 100644 index 0000000..0d390d7 --- /dev/null +++ b/tests/fixtures/messages/dkim/email.07 @@ -0,0 +1,4 @@ +From: + +A single line of body text + diff --git a/tests/fixtures/messages/dkim/email.08 b/tests/fixtures/messages/dkim/email.08 new file mode 100644 index 0000000..6a3ccc8 --- /dev/null +++ b/tests/fixtures/messages/dkim/email.08 @@ -0,0 +1,4 @@ +From: + +Single line of body text + diff --git a/tests/fixtures/messages/dkim/email.09 b/tests/fixtures/messages/dkim/email.09 new file mode 100644 index 0000000..79ca745 --- /dev/null +++ b/tests/fixtures/messages/dkim/email.09 @@ -0,0 +1,5 @@ +From: + +First line of body text + +Second line of body text diff --git a/tests/fixtures/messages/dkim/email.10 b/tests/fixtures/messages/dkim/email.10 new file mode 100644 index 0000000..58b95dc --- /dev/null +++ b/tests/fixtures/messages/dkim/email.10 @@ -0,0 +1,5 @@ +From: + +First line of body text + +Second line of body text diff --git a/tests/fixtures/messages/dkim/email.11 b/tests/fixtures/messages/dkim/email.11 new file mode 100644 index 0000000..bd6e360 --- /dev/null +++ b/tests/fixtures/messages/dkim/email.11 @@ -0,0 +1,5 @@ +From: + +First line of body text + +Second line of body text diff --git a/tests/fixtures/messages/dkim/email.12 b/tests/fixtures/messages/dkim/email.12 new file mode 100644 index 0000000..2e1c02f --- /dev/null +++ b/tests/fixtures/messages/dkim/email.12 @@ -0,0 +1,6 @@ +From: + +First line of body text + + +Second line of body text diff --git a/tests/fixtures/messages/dkim/email.13 b/tests/fixtures/messages/dkim/email.13 new file mode 100644 index 0000000..5ff513b --- /dev/null +++ b/tests/fixtures/messages/dkim/email.13 @@ -0,0 +1,8 @@ +From: + +First line of body text + + +Second line of body text + + diff --git a/tests/fixtures/messages/dkim/email.14 b/tests/fixtures/messages/dkim/email.14 new file mode 100644 index 0000000..0cf36af --- /dev/null +++ b/tests/fixtures/messages/dkim/email.14 @@ -0,0 +1,5 @@ +From: +Subject: This line has trailing spaces +Comment: This line has leading and trailing tabs + +Plain line of body text diff --git a/tests/fixtures/messages/dkim/email.19 b/tests/fixtures/messages/dkim/email.19 new file mode 100644 index 0000000..a376699 --- /dev/null +++ b/tests/fixtures/messages/dkim/email.19 @@ -0,0 +1,15 @@ +From: +Subject: This line has trailing spaces +Comment: This line has leading and trailing tabs + +Plain line of body text + + Tabbed in line with trailing spaces + + Spaced in line with trailing tabs + + Following lines have spaces and tabs + + + + diff --git a/tests/fixtures/messages/dkim/email.20 b/tests/fixtures/messages/dkim/email.20 new file mode 100644 index 0000000..7dbfdd3 --- /dev/null +++ b/tests/fixtures/messages/dkim/email.20 @@ -0,0 +1,5 @@ +From: +Subject: This subject that wraps + onto a new line with a space + +Single line of text diff --git a/tests/fixtures/messages/dkim/email.21 b/tests/fixtures/messages/dkim/email.21 new file mode 100644 index 0000000..0d24eb5 --- /dev/null +++ b/tests/fixtures/messages/dkim/email.21 @@ -0,0 +1,6 @@ +From: +Subject: This subject that wraps + onto a new line with a space + and then onto another line indented by a tab + +Single line of text diff --git a/tests/fixtures/messages/dkim/email.22 b/tests/fixtures/messages/dkim/email.22 new file mode 100644 index 0000000..6b6c10c --- /dev/null +++ b/tests/fixtures/messages/dkim/email.22 @@ -0,0 +1,14 @@ +From: +Subject: This subject that wraps + onto a new line with a space + and then onto another line indented by a tab +To: +Comment: This line has leading spaces and wraps + to a second and + a third + and a fourth + and a firth + and lastly a sixed +Message-Id: <12345.mail@example.net> + +Single line of text diff --git a/tests/fixtures/messages/dkim/email.23 b/tests/fixtures/messages/dkim/email.23 new file mode 100644 index 0000000..830a650 --- /dev/null +++ b/tests/fixtures/messages/dkim/email.23 @@ -0,0 +1,16 @@ +From: +Subject: This subject that wraps + onto a new line with a space + and then onto another line indented by a tab +To: +Comment: This line has leading spaces and wraps + to a second and + a third + and a fourth + and a firth + and lastly a sixed +Message-Id: <12345.mail@example.net> + + + +Single line of text diff --git a/tests/fixtures/messages/dkim/email.24 b/tests/fixtures/messages/dkim/email.24 new file mode 100644 index 0000000..fe44673 --- /dev/null +++ b/tests/fixtures/messages/dkim/email.24 @@ -0,0 +1,22 @@ +From: +Subject: This subject that wraps + onto a new line with a space + and then onto another line indented by a tab +To: +Comment: This line has leading spaces and wraps + to a second and + a third + and a fourth + and a firth + and lastly a sixed +Message-Id: <12345.mail@example.net> + + + + + + + + + + \ No newline at end of file diff --git a/tests/fixtures/messages/dkim/email.25 b/tests/fixtures/messages/dkim/email.25 new file mode 100644 index 0000000..59e5622 --- /dev/null +++ b/tests/fixtures/messages/dkim/email.25 @@ -0,0 +1,17 @@ +From: +Subject: This subject that wraps + onto a new line with a space + and then onto another line indented by a tab +To: +Comment: This line has leading spaces and wraps + to a second and + a third + and a fourth + and a firth + and lastly a sixed +Message-Id: <12345.mail@example.net> + +This line has embedded s p a c e s and t a b and C R C Returns + + + diff --git a/tests/fixtures/messages/dkim/nofws.expected.01 b/tests/fixtures/messages/dkim/nofws.expected.01 new file mode 100644 index 0000000..e69de29 diff --git a/tests/fixtures/messages/dkim/nofws.expected.02 b/tests/fixtures/messages/dkim/nofws.expected.02 new file mode 100644 index 0000000..e91711d --- /dev/null +++ b/tests/fixtures/messages/dkim/nofws.expected.02 @@ -0,0 +1 @@ +From: diff --git a/tests/fixtures/messages/dkim/nofws.expected.03 b/tests/fixtures/messages/dkim/nofws.expected.03 new file mode 100644 index 0000000..e91711d --- /dev/null +++ b/tests/fixtures/messages/dkim/nofws.expected.03 @@ -0,0 +1 @@ +From: diff --git a/tests/fixtures/messages/dkim/nofws.expected.04 b/tests/fixtures/messages/dkim/nofws.expected.04 new file mode 100644 index 0000000..570c118 --- /dev/null +++ b/tests/fixtures/messages/dkim/nofws.expected.04 @@ -0,0 +1,3 @@ +From: + +Asinglelineofbodytext diff --git a/tests/fixtures/messages/dkim/nofws.expected.05 b/tests/fixtures/messages/dkim/nofws.expected.05 new file mode 100644 index 0000000..570c118 --- /dev/null +++ b/tests/fixtures/messages/dkim/nofws.expected.05 @@ -0,0 +1,3 @@ +From: + +Asinglelineofbodytext diff --git a/tests/fixtures/messages/dkim/nofws.expected.06 b/tests/fixtures/messages/dkim/nofws.expected.06 new file mode 100644 index 0000000..570c118 --- /dev/null +++ b/tests/fixtures/messages/dkim/nofws.expected.06 @@ -0,0 +1,3 @@ +From: + +Asinglelineofbodytext diff --git a/tests/fixtures/messages/dkim/nofws.expected.07 b/tests/fixtures/messages/dkim/nofws.expected.07 new file mode 100644 index 0000000..570c118 --- /dev/null +++ b/tests/fixtures/messages/dkim/nofws.expected.07 @@ -0,0 +1,3 @@ +From: + +Asinglelineofbodytext diff --git a/tests/fixtures/messages/dkim/nofws.expected.08 b/tests/fixtures/messages/dkim/nofws.expected.08 new file mode 100644 index 0000000..2acbad6 --- /dev/null +++ b/tests/fixtures/messages/dkim/nofws.expected.08 @@ -0,0 +1,3 @@ +From: + +Singlelineofbodytext diff --git a/tests/fixtures/messages/dkim/nofws.expected.09 b/tests/fixtures/messages/dkim/nofws.expected.09 new file mode 100644 index 0000000..8b13a74 --- /dev/null +++ b/tests/fixtures/messages/dkim/nofws.expected.09 @@ -0,0 +1,5 @@ +From: + +Firstlineofbodytext + +Secondlineofbodytext diff --git a/tests/fixtures/messages/dkim/nofws.expected.10 b/tests/fixtures/messages/dkim/nofws.expected.10 new file mode 100644 index 0000000..8b13a74 --- /dev/null +++ b/tests/fixtures/messages/dkim/nofws.expected.10 @@ -0,0 +1,5 @@ +From: + +Firstlineofbodytext + +Secondlineofbodytext diff --git a/tests/fixtures/messages/dkim/nofws.expected.11 b/tests/fixtures/messages/dkim/nofws.expected.11 new file mode 100644 index 0000000..8b13a74 --- /dev/null +++ b/tests/fixtures/messages/dkim/nofws.expected.11 @@ -0,0 +1,5 @@ +From: + +Firstlineofbodytext + +Secondlineofbodytext diff --git a/tests/fixtures/messages/dkim/nofws.expected.12 b/tests/fixtures/messages/dkim/nofws.expected.12 new file mode 100644 index 0000000..1c85f20 --- /dev/null +++ b/tests/fixtures/messages/dkim/nofws.expected.12 @@ -0,0 +1,6 @@ +From: + +Firstlineofbodytext + + +Secondlineofbodytext diff --git a/tests/fixtures/messages/dkim/nofws.expected.13 b/tests/fixtures/messages/dkim/nofws.expected.13 new file mode 100644 index 0000000..1c85f20 --- /dev/null +++ b/tests/fixtures/messages/dkim/nofws.expected.13 @@ -0,0 +1,6 @@ +From: + +Firstlineofbodytext + + +Secondlineofbodytext diff --git a/tests/fixtures/messages/dkim/nofws.expected.14 b/tests/fixtures/messages/dkim/nofws.expected.14 new file mode 100644 index 0000000..f951128 --- /dev/null +++ b/tests/fixtures/messages/dkim/nofws.expected.14 @@ -0,0 +1,5 @@ +From: +Subject:Thislinehastrailingspaces +Comment:Thislinehasleadingandtrailingtabs + +Plainlineofbodytext diff --git a/tests/fixtures/messages/dkim/nofws.expected.19 b/tests/fixtures/messages/dkim/nofws.expected.19 new file mode 100644 index 0000000..96caece --- /dev/null +++ b/tests/fixtures/messages/dkim/nofws.expected.19 @@ -0,0 +1,11 @@ +From: +Subject:Thislinehastrailingspaces +Comment:Thislinehasleadingandtrailingtabs + +Plainlineofbodytext + +Tabbedinlinewithtrailingspaces + +Spacedinlinewithtrailingtabs + +Followinglineshavespacesandtabs diff --git a/tests/fixtures/messages/dkim/nofws.expected.20 b/tests/fixtures/messages/dkim/nofws.expected.20 new file mode 100644 index 0000000..7cd9523 --- /dev/null +++ b/tests/fixtures/messages/dkim/nofws.expected.20 @@ -0,0 +1,4 @@ +From: +Subject:Thissubjectthatwrapsontoanewlinewithaspace + +Singlelineoftext diff --git a/tests/fixtures/messages/dkim/nofws.expected.21 b/tests/fixtures/messages/dkim/nofws.expected.21 new file mode 100644 index 0000000..60f6079 --- /dev/null +++ b/tests/fixtures/messages/dkim/nofws.expected.21 @@ -0,0 +1,4 @@ +From: +Subject:Thissubjectthatwrapsontoanewlinewithaspaceandthenontoanotherlineindentedbyatab + +Singlelineoftext diff --git a/tests/fixtures/messages/dkim/nofws.expected.22 b/tests/fixtures/messages/dkim/nofws.expected.22 new file mode 100644 index 0000000..7c881c1 --- /dev/null +++ b/tests/fixtures/messages/dkim/nofws.expected.22 @@ -0,0 +1,7 @@ +From: +Subject:Thissubjectthatwrapsontoanewlinewithaspaceandthenontoanotherlineindentedbyatab +To: +Comment:Thislinehasleadingspacesandwrapstoasecondandathirdandafourthandafirthandlastlyasixed +Message-Id:<12345.mail@example.net> + +Singlelineoftext diff --git a/tests/fixtures/messages/dkim/nofws.expected.23 b/tests/fixtures/messages/dkim/nofws.expected.23 new file mode 100644 index 0000000..a5a3e19 --- /dev/null +++ b/tests/fixtures/messages/dkim/nofws.expected.23 @@ -0,0 +1,9 @@ +From: +Subject:Thissubjectthatwrapsontoanewlinewithaspaceandthenontoanotherlineindentedbyatab +To: +Comment:Thislinehasleadingspacesandwrapstoasecondandathirdandafourthandafirthandlastlyasixed +Message-Id:<12345.mail@example.net> + + + +Singlelineoftext diff --git a/tests/fixtures/messages/dkim/nofws.expected.24 b/tests/fixtures/messages/dkim/nofws.expected.24 new file mode 100644 index 0000000..d9d0131 --- /dev/null +++ b/tests/fixtures/messages/dkim/nofws.expected.24 @@ -0,0 +1,5 @@ +From: +Subject:Thissubjectthatwrapsontoanewlinewithaspaceandthenontoanotherlineindentedbyatab +To: +Comment:Thislinehasleadingspacesandwrapstoasecondandathirdandafourthandafirthandlastlyasixed +Message-Id:<12345.mail@example.net> diff --git a/tests/fixtures/messages/dkim/nofws.expected.25 b/tests/fixtures/messages/dkim/nofws.expected.25 new file mode 100644 index 0000000..35864f0 --- /dev/null +++ b/tests/fixtures/messages/dkim/nofws.expected.25 @@ -0,0 +1,7 @@ +From: +Subject:Thissubjectthatwrapsontoanewlinewithaspaceandthenontoanotherlineindentedbyatab +To: +Comment:Thislinehasleadingspacesandwrapstoasecondandathirdandafourthandafirthandlastlyasixed +Message-Id:<12345.mail@example.net> + +ThislinehasembeddedspacesandtabandCRCReturns diff --git a/tests/fixtures/messages/dkim/purpose.01 b/tests/fixtures/messages/dkim/purpose.01 new file mode 100644 index 0000000..6eb709c --- /dev/null +++ b/tests/fixtures/messages/dkim/purpose.01 @@ -0,0 +1 @@ +A completely empty file \ No newline at end of file diff --git a/tests/fixtures/messages/dkim/purpose.02 b/tests/fixtures/messages/dkim/purpose.02 new file mode 100644 index 0000000..f1e04d6 --- /dev/null +++ b/tests/fixtures/messages/dkim/purpose.02 @@ -0,0 +1 @@ +A single header, no body, no separator diff --git a/tests/fixtures/messages/dkim/purpose.03 b/tests/fixtures/messages/dkim/purpose.03 new file mode 100644 index 0000000..aab2fb2 --- /dev/null +++ b/tests/fixtures/messages/dkim/purpose.03 @@ -0,0 +1 @@ +Single header with a separator diff --git a/tests/fixtures/messages/dkim/purpose.04 b/tests/fixtures/messages/dkim/purpose.04 new file mode 100644 index 0000000..63effe7 --- /dev/null +++ b/tests/fixtures/messages/dkim/purpose.04 @@ -0,0 +1 @@ +Single header with a separator and one body text line diff --git a/tests/fixtures/messages/dkim/purpose.05 b/tests/fixtures/messages/dkim/purpose.05 new file mode 100644 index 0000000..a23a55a --- /dev/null +++ b/tests/fixtures/messages/dkim/purpose.05 @@ -0,0 +1 @@ +Single header with a separator, one body text line and a trailing empty line diff --git a/tests/fixtures/messages/dkim/purpose.06 b/tests/fixtures/messages/dkim/purpose.06 new file mode 100644 index 0000000..cdebcd6 --- /dev/null +++ b/tests/fixtures/messages/dkim/purpose.06 @@ -0,0 +1 @@ +Single header with a separator, one body text line and two trailing empty lines diff --git a/tests/fixtures/messages/dkim/purpose.07 b/tests/fixtures/messages/dkim/purpose.07 new file mode 100644 index 0000000..9c4dfde --- /dev/null +++ b/tests/fixtures/messages/dkim/purpose.07 @@ -0,0 +1 @@ +Single header with a separator, one body text line and a trailing empty line with spaces diff --git a/tests/fixtures/messages/dkim/purpose.08 b/tests/fixtures/messages/dkim/purpose.08 new file mode 100644 index 0000000..5a37d2d --- /dev/null +++ b/tests/fixtures/messages/dkim/purpose.08 @@ -0,0 +1 @@ +Single header with a separator, one body text line and a trailing empty line with spaces and tabs diff --git a/tests/fixtures/messages/dkim/purpose.09 b/tests/fixtures/messages/dkim/purpose.09 new file mode 100644 index 0000000..96227f2 --- /dev/null +++ b/tests/fixtures/messages/dkim/purpose.09 @@ -0,0 +1 @@ +Single header with a separator, two body lines separated by a blank line diff --git a/tests/fixtures/messages/dkim/purpose.10 b/tests/fixtures/messages/dkim/purpose.10 new file mode 100644 index 0000000..f0ceb88 --- /dev/null +++ b/tests/fixtures/messages/dkim/purpose.10 @@ -0,0 +1 @@ +Single header with a separator, two body lines separated by a line with spaces diff --git a/tests/fixtures/messages/dkim/purpose.11 b/tests/fixtures/messages/dkim/purpose.11 new file mode 100644 index 0000000..9790a38 --- /dev/null +++ b/tests/fixtures/messages/dkim/purpose.11 @@ -0,0 +1 @@ +Single header with a separator, two body lines separated by a line with spaces and tabs diff --git a/tests/fixtures/messages/dkim/purpose.12 b/tests/fixtures/messages/dkim/purpose.12 new file mode 100644 index 0000000..1abc952 --- /dev/null +++ b/tests/fixtures/messages/dkim/purpose.12 @@ -0,0 +1 @@ +Single header with a separator, two body lines separated by two lines with spaces and tabs diff --git a/tests/fixtures/messages/dkim/purpose.13 b/tests/fixtures/messages/dkim/purpose.13 new file mode 100644 index 0000000..142ff84 --- /dev/null +++ b/tests/fixtures/messages/dkim/purpose.13 @@ -0,0 +1,3 @@ +Single header with a separator, two body lines separated by two lines with spaces and tabs, +trailing two lines have spaces and tabs + diff --git a/tests/fixtures/messages/dkim/purpose.14 b/tests/fixtures/messages/dkim/purpose.14 new file mode 100644 index 0000000..36bdb53 --- /dev/null +++ b/tests/fixtures/messages/dkim/purpose.14 @@ -0,0 +1 @@ +Trailing spaces in headers. diff --git a/tests/fixtures/messages/dkim/purpose.19 b/tests/fixtures/messages/dkim/purpose.19 new file mode 100644 index 0000000..ceb6221 --- /dev/null +++ b/tests/fixtures/messages/dkim/purpose.19 @@ -0,0 +1 @@ +Leading and trailing spaces and tabs in headers and body. diff --git a/tests/fixtures/messages/dkim/purpose.20 b/tests/fixtures/messages/dkim/purpose.20 new file mode 100644 index 0000000..90941e9 --- /dev/null +++ b/tests/fixtures/messages/dkim/purpose.20 @@ -0,0 +1,3 @@ +Single header wrap. + + diff --git a/tests/fixtures/messages/dkim/purpose.21 b/tests/fixtures/messages/dkim/purpose.21 new file mode 100644 index 0000000..a899ab1 --- /dev/null +++ b/tests/fixtures/messages/dkim/purpose.21 @@ -0,0 +1,3 @@ +Multiple header wrap. + + diff --git a/tests/fixtures/messages/dkim/purpose.22 b/tests/fixtures/messages/dkim/purpose.22 new file mode 100644 index 0000000..9e7b73c --- /dev/null +++ b/tests/fixtures/messages/dkim/purpose.22 @@ -0,0 +1,3 @@ +Multiple header wrap with normal follow-on line + + diff --git a/tests/fixtures/messages/dkim/purpose.23 b/tests/fixtures/messages/dkim/purpose.23 new file mode 100644 index 0000000..800fe7f --- /dev/null +++ b/tests/fixtures/messages/dkim/purpose.23 @@ -0,0 +1,4 @@ +Multiple header wrap with subsequent headers and multiple blank separators + + + diff --git a/tests/fixtures/messages/dkim/purpose.24 b/tests/fixtures/messages/dkim/purpose.24 new file mode 100644 index 0000000..1b33d69 --- /dev/null +++ b/tests/fixtures/messages/dkim/purpose.24 @@ -0,0 +1 @@ +Multiple header wrap with subsequent headers and multiple blank separators and no body text diff --git a/tests/fixtures/messages/dkim/purpose.25 b/tests/fixtures/messages/dkim/purpose.25 new file mode 100644 index 0000000..30d6a8c --- /dev/null +++ b/tests/fixtures/messages/dkim/purpose.25 @@ -0,0 +1 @@ +Embedded CRs with whitespace - this may not work on some OSes... \ No newline at end of file diff --git a/tests/fixtures/messages/dkim/simple.expected.01 b/tests/fixtures/messages/dkim/simple.expected.01 new file mode 100644 index 0000000..e69de29 diff --git a/tests/fixtures/messages/dkim/simple.expected.02 b/tests/fixtures/messages/dkim/simple.expected.02 new file mode 100644 index 0000000..b64ba46 --- /dev/null +++ b/tests/fixtures/messages/dkim/simple.expected.02 @@ -0,0 +1,3 @@ +From: + + diff --git a/tests/fixtures/messages/dkim/simple.expected.03 b/tests/fixtures/messages/dkim/simple.expected.03 new file mode 100644 index 0000000..b64ba46 --- /dev/null +++ b/tests/fixtures/messages/dkim/simple.expected.03 @@ -0,0 +1,3 @@ +From: + + diff --git a/tests/fixtures/messages/dkim/simple.expected.04 b/tests/fixtures/messages/dkim/simple.expected.04 new file mode 100644 index 0000000..4b128e3 --- /dev/null +++ b/tests/fixtures/messages/dkim/simple.expected.04 @@ -0,0 +1,3 @@ +From: + +A single line of body text diff --git a/tests/fixtures/messages/dkim/simple.expected.05 b/tests/fixtures/messages/dkim/simple.expected.05 new file mode 100644 index 0000000..4b128e3 --- /dev/null +++ b/tests/fixtures/messages/dkim/simple.expected.05 @@ -0,0 +1,3 @@ +From: + +A single line of body text diff --git a/tests/fixtures/messages/dkim/simple.expected.06 b/tests/fixtures/messages/dkim/simple.expected.06 new file mode 100644 index 0000000..4b128e3 --- /dev/null +++ b/tests/fixtures/messages/dkim/simple.expected.06 @@ -0,0 +1,3 @@ +From: + +A single line of body text diff --git a/tests/fixtures/messages/dkim/simple.expected.07 b/tests/fixtures/messages/dkim/simple.expected.07 new file mode 100644 index 0000000..d2d165b --- /dev/null +++ b/tests/fixtures/messages/dkim/simple.expected.07 @@ -0,0 +1,4 @@ +From: + +A single line of body text + diff --git a/tests/fixtures/messages/dkim/simple.expected.08 b/tests/fixtures/messages/dkim/simple.expected.08 new file mode 100644 index 0000000..5c1c1a6 --- /dev/null +++ b/tests/fixtures/messages/dkim/simple.expected.08 @@ -0,0 +1,4 @@ +From: + +Single line of body text + diff --git a/tests/fixtures/messages/dkim/simple.expected.09 b/tests/fixtures/messages/dkim/simple.expected.09 new file mode 100644 index 0000000..577b377 --- /dev/null +++ b/tests/fixtures/messages/dkim/simple.expected.09 @@ -0,0 +1,5 @@ +From: + +First line of body text + +Second line of body text diff --git a/tests/fixtures/messages/dkim/simple.expected.10 b/tests/fixtures/messages/dkim/simple.expected.10 new file mode 100644 index 0000000..52a6253 --- /dev/null +++ b/tests/fixtures/messages/dkim/simple.expected.10 @@ -0,0 +1,5 @@ +From: + +First line of body text + +Second line of body text diff --git a/tests/fixtures/messages/dkim/simple.expected.11 b/tests/fixtures/messages/dkim/simple.expected.11 new file mode 100644 index 0000000..cf999f1 --- /dev/null +++ b/tests/fixtures/messages/dkim/simple.expected.11 @@ -0,0 +1,5 @@ +From: + +First line of body text + +Second line of body text diff --git a/tests/fixtures/messages/dkim/simple.expected.12 b/tests/fixtures/messages/dkim/simple.expected.12 new file mode 100644 index 0000000..cda2e4f --- /dev/null +++ b/tests/fixtures/messages/dkim/simple.expected.12 @@ -0,0 +1,6 @@ +From: + +First line of body text + + +Second line of body text diff --git a/tests/fixtures/messages/dkim/simple.expected.13 b/tests/fixtures/messages/dkim/simple.expected.13 new file mode 100644 index 0000000..da74352 --- /dev/null +++ b/tests/fixtures/messages/dkim/simple.expected.13 @@ -0,0 +1,8 @@ +From: + +First line of body text + + +Second line of body text + + diff --git a/tests/fixtures/messages/dkim/simple.expected.14 b/tests/fixtures/messages/dkim/simple.expected.14 new file mode 100644 index 0000000..fa18029 --- /dev/null +++ b/tests/fixtures/messages/dkim/simple.expected.14 @@ -0,0 +1,5 @@ +From: +Subject: This line has trailing spaces +Comment: This line has leading and trailing tabs + +Plain line of body text diff --git a/tests/fixtures/messages/dkim/simple.expected.19 b/tests/fixtures/messages/dkim/simple.expected.19 new file mode 100644 index 0000000..2f4bd6a --- /dev/null +++ b/tests/fixtures/messages/dkim/simple.expected.19 @@ -0,0 +1,14 @@ +From: +Subject: This line has trailing spaces +Comment: This line has leading and trailing tabs + +Plain line of body text + + Tabbed in line with trailing spaces + + Spaced in line with trailing tabs + + Following lines have spaces and tabs + + + diff --git a/tests/fixtures/messages/dkim/simple.expected.20 b/tests/fixtures/messages/dkim/simple.expected.20 new file mode 100644 index 0000000..6ef6dce --- /dev/null +++ b/tests/fixtures/messages/dkim/simple.expected.20 @@ -0,0 +1,5 @@ +From: +Subject: This subject that wraps + onto a new line with a space + +Single line of text diff --git a/tests/fixtures/messages/dkim/simple.expected.21 b/tests/fixtures/messages/dkim/simple.expected.21 new file mode 100644 index 0000000..7bb0010 --- /dev/null +++ b/tests/fixtures/messages/dkim/simple.expected.21 @@ -0,0 +1,6 @@ +From: +Subject: This subject that wraps + onto a new line with a space + and then onto another line indented by a tab + +Single line of text diff --git a/tests/fixtures/messages/dkim/simple.expected.22 b/tests/fixtures/messages/dkim/simple.expected.22 new file mode 100644 index 0000000..4bed0eb --- /dev/null +++ b/tests/fixtures/messages/dkim/simple.expected.22 @@ -0,0 +1,14 @@ +From: +Subject: This subject that wraps + onto a new line with a space + and then onto another line indented by a tab +To: +Comment: This line has leading spaces and wraps + to a second and + a third + and a fourth + and a firth + and lastly a sixed +Message-Id: <12345.mail@example.net> + +Single line of text diff --git a/tests/fixtures/messages/dkim/simple.expected.23 b/tests/fixtures/messages/dkim/simple.expected.23 new file mode 100644 index 0000000..4f58c69 --- /dev/null +++ b/tests/fixtures/messages/dkim/simple.expected.23 @@ -0,0 +1,16 @@ +From: +Subject: This subject that wraps + onto a new line with a space + and then onto another line indented by a tab +To: +Comment: This line has leading spaces and wraps + to a second and + a third + and a fourth + and a firth + and lastly a sixed +Message-Id: <12345.mail@example.net> + + + +Single line of text diff --git a/tests/fixtures/messages/dkim/simple.expected.24 b/tests/fixtures/messages/dkim/simple.expected.24 new file mode 100644 index 0000000..c1466f3 --- /dev/null +++ b/tests/fixtures/messages/dkim/simple.expected.24 @@ -0,0 +1,22 @@ +From: +Subject: This subject that wraps + onto a new line with a space + and then onto another line indented by a tab +To: +Comment: This line has leading spaces and wraps + to a second and + a third + and a fourth + and a firth + and lastly a sixed +Message-Id: <12345.mail@example.net> + + + + + + + + + + diff --git a/tests/fixtures/messages/dkim/simple.expected.25 b/tests/fixtures/messages/dkim/simple.expected.25 new file mode 100644 index 0000000..3972c1a --- /dev/null +++ b/tests/fixtures/messages/dkim/simple.expected.25 @@ -0,0 +1,14 @@ +From: +Subject: This subject that wraps + onto a new line with a space + and then onto another line indented by a tab +To: +Comment: This line has leading spaces and wraps + to a second and + a third + and a fourth + and a firth + and lastly a sixed +Message-Id: <12345.mail@example.net> + +This line has embedded s p a c e s and t a b and C R C Returns -- 2.43.0