From 6a11a9e618a72b8d96aecb2ad9aa300b98f8d991 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sun, 29 Nov 2015 01:12:38 +0000 Subject: DKIM: relaxed body canonicalisation should ignore whitespace at EOL and empty lines at EOM. Bug 1721 --- test/scripts/4500-Domain-Keys-Identified-Mail/4500 | 39 +++++++++++ test/scripts/4500-Domain-Keys-Identified-Mail/4501 | 80 ++++++++++++++++++++++ test/scripts/4500-Domain-Keys-Identified-Mail/4502 | 55 +++++++++++++++ 3 files changed, 174 insertions(+) create mode 100644 test/scripts/4500-Domain-Keys-Identified-Mail/4500 create mode 100644 test/scripts/4500-Domain-Keys-Identified-Mail/4501 create mode 100644 test/scripts/4500-Domain-Keys-Identified-Mail/4502 (limited to 'test/scripts/4500-Domain-Keys-Identified-Mail') diff --git a/test/scripts/4500-Domain-Keys-Identified-Mail/4500 b/test/scripts/4500-Domain-Keys-Identified-Mail/4500 new file mode 100644 index 000000000..1dea02245 --- /dev/null +++ b/test/scripts/4500-Domain-Keys-Identified-Mail/4500 @@ -0,0 +1,39 @@ +# DKIM simple canonicalisation +# +exim -DSERVER=server -bd -oX PORT_D +**** +# +# This should pass. +# Mail original in aux-fixed/4500.msg1.txt +# Sig generatd by: perl aux-fixed/dkim/sign.pl --method=simple/simple < aux-fixed/4500.msg1.txt +client 127.0.0.1 PORT_D +??? 220 +HELO xxx +??? 250 +MAIL FROM: +??? 250 +RCPT TO: +??? 250 +DATA +??? 354 +DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=test.ex; h=from:to + :date:message-id:subject; s=sel; bh=OB9dZVu7+5/ufs3TH9leIcEpXSo=; b= + PeUA8iBGfStWv+9/BBKkvCEYj/AVMl4e9k+AqWOXKyuEUfHxqAnV+sPnOejpmvT8 + 41kuM4u0bICvK371YvB/yO61vtliRhyqU76Y2e55p2uvMADb3UyDhLyzpco4+yBo + 1w0AuIxu0VU4TK8UmOLyCw/1hxrh1DcEInbEMEKJ7kI= +From: mrgus@text.ex +To: bakawolf@yahoo.com +Date: Thu, 19 Nov 2015 17:00:07 -0700 +Message-ID: +Subject: simple test + +This is a simple test. +. +??? 250 +QUIT +??? 221 +**** +# +killdaemon +no_stdout_check +no_msglog_check diff --git a/test/scripts/4500-Domain-Keys-Identified-Mail/4501 b/test/scripts/4500-Domain-Keys-Identified-Mail/4501 new file mode 100644 index 000000000..5a4bf2be6 --- /dev/null +++ b/test/scripts/4500-Domain-Keys-Identified-Mail/4501 @@ -0,0 +1,80 @@ +# DKIM simple canonicalisation, with spaces +# +exim -DSERVER=server -bd -oX PORT_D +**** +# +# this should pass verification +# Mail original in aux-fixed/4501.msg1.txt +# Sig generated by: perl aux-fixed/dkim/sign.pl --method=simple/simple < aux-fixed/4501.msg1.txt +client 127.0.0.1 PORT_D +??? 220 +HELO xxx +??? 250 +MAIL FROM: +??? 250 +RCPT TO: +??? 250 +DATA +??? 354 +DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=test.ex; h=from:to + :date:message-id:subject; s=sel; bh=pdsXC6mnKSmAYjraebHb2Tt2xqw=; b= + bE9pnPdz5eDwz58PFMAsiFqpcsel33p5+pnvhwY5D6B6suGFbvku+LC1pi77z3lq + 45mFRxT4Dr4rW4612jYi5WpNk8ed28BkNMowUCgkM2TDoktiRClFpXTUX00hCico + KWcgcvORf6L8txhtICsHsl94ERKXxgptXHQk8XwMEuU= +From: mrgus@test.ex +To: bakawolf@yahoo.com +Date: Thu, 19 Nov 2015 17:00:07 -0700 +Message-ID: +Subject: simple space test + +This is a test of simple with spaces. + + + +End of content (spaced line two lines down). +. +??? 250 +QUIT +??? 221 +**** +# +# this should fail verification +# Same message and sig as above, but body extended with (emptyline) (line with only spaces) (emptyline) +client 127.0.0.1 PORT_D +??? 220 +HELO xxx +??? 250 +MAIL FROM: +??? 250 +RCPT TO: +??? 250 +DATA +??? 354 +DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=test.ex; h=from:to + :date:message-id:subject; s=sel; bh=pdsXC6mnKSmAYjraebHb2Tt2xqw=; b= + bE9pnPdz5eDwz58PFMAsiFqpcsel33p5+pnvhwY5D6B6suGFbvku+LC1pi77z3lq + 45mFRxT4Dr4rW4612jYi5WpNk8ed28BkNMowUCgkM2TDoktiRClFpXTUX00hCico + KWcgcvORf6L8txhtICsHsl94ERKXxgptXHQk8XwMEuU= +From: mrgus@test.ex +To: bakawolf@yahoo.com +Date: Thu, 19 Nov 2015 17:00:07 -0700 +Message-ID: +Subject: simple space test + +This is a test of simple with spaces. + + + +End of content (spaced line two lines down). + + + +. +??? 250 +QUIT +??? 221 +**** +# +killdaemon +no_stdout_check +no_msglog_check diff --git a/test/scripts/4500-Domain-Keys-Identified-Mail/4502 b/test/scripts/4500-Domain-Keys-Identified-Mail/4502 new file mode 100644 index 000000000..9f6d62fcd --- /dev/null +++ b/test/scripts/4500-Domain-Keys-Identified-Mail/4502 @@ -0,0 +1,55 @@ +# DKIM relaxed canonicalisation +# +exim -DSERVER=server -bd -oX PORT_D +**** +# +# This should pass. +# Mail original in aux-fixed/4502.msg1.txt +# Sig generated by: perl aux-fixed/dkim/sign.pl --method=relaxed/relaxed < aux_fixed/4502.msg1.txt +client 127.0.0.1 PORT_D +??? 220 +HELO xxx +??? 250 +MAIL FROM: +??? 250 +RCPT TO: +??? 250 +DATA +??? 354 +DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=test.ex; h= + message-id:date:from:mime-version:to:subject:content-type + :content-transfer-encoding; s=sel; bh=rn0kk3aPKyhYbxzfi3WG8dAxhN + M=; b=Tsi3kJtTNmIP0LAkEXR201R/alr7FwaWRAP+V9qQZf7MzAFrkfKAhkT3UQ + zPTJsZowOZaM1UoeeDQCvfvHG5YG8YCFwU3tuLgdDvbCmYJvR+jPNntN27BXcrVH + fyQLstR8eQPUopT7vmdYwsMlXz0Jv7iLM1MyxsWn6z1LTlvYA= +Message-ID: <564CFC9B.1040905@yahoo.com> +Date: Wed, 18 Nov 2015 14:32:59 -0800 +From: Joaquin Lopez +User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:24.0) Gecko/20100101 Thunderbird/24.0 +MIME-Version: 1.0 +To: bakawolf@yahoo.com +Subject: test +Content-Type: text/plain; charset=ISO-8859-1; format=flowed +Content-Transfer-Encoding: 7bit +Content-Length: 13 + + + +test + + + + + + + + +. +??? 250 +QUIT +??? 221 +**** +# +killdaemon +no_stdout_check +no_msglog_check -- cgit v1.2.3