diff options
author | Heiko Schlittermann (HS12-RIPE) <hs@schlittermann.de> | 2017-01-18 22:31:05 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2017-01-21 22:33:11 +0000 |
commit | ccd0b6c1e2b8b0f6eafede86ec9bacebdb07053c (patch) | |
tree | de8d4700cc47f8fcdc47f3c6a958fd665f05db4c | |
parent | 514d55a497bf09fce132e6e4e2ade532eb841f2c (diff) |
Testsuite: Add DKIM Chunking test
-rw-r--r-- | test/aux-fixed/4500.msg2.txt | 8 | ||||
l--------- | test/confs/4510 | 1 | ||||
-rw-r--r-- | test/log/4510 | 7 | ||||
-rw-r--r-- | test/scripts/4500-DKIM/4510 | 85 | ||||
-rw-r--r-- | test/stderr/4510 | 6 | ||||
-rw-r--r-- | test/stdout/4510 | 97 |
6 files changed, 204 insertions, 0 deletions
diff --git a/test/aux-fixed/4500.msg2.txt b/test/aux-fixed/4500.msg2.txt new file mode 100644 index 000000000..0467dd4b3 --- /dev/null +++ b/test/aux-fixed/4500.msg2.txt @@ -0,0 +1,8 @@ +From: mrgus@text.ex +To: bakawolf@yahoo.com +Date: Thu, 19 Nov 2015 17:00:07 -0700 +Message-ID: <qwerty1234@disco-zombie.net> +Subject: simple test + +Line 1: This is a simple test. +Line 2: This is a simple test. diff --git a/test/confs/4510 b/test/confs/4510 new file mode 120000 index 000000000..1bb987150 --- /dev/null +++ b/test/confs/4510 @@ -0,0 +1 @@ +0900
\ No newline at end of file diff --git a/test/log/4510 b/test/log/4510 new file mode 100644 index 000000000..c0b414b02 --- /dev/null +++ b/test/log/4510 @@ -0,0 +1,7 @@ + +******** SERVER ******** +1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1224 +1999-03-02 09:44:33 10HmaX-0005vi-00 DKIM: d=test.ex s=sel c=simple/simple a=rsa-sha256 b=1024 [verification succeeded] +1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@bloggs.com H=(xxx) [127.0.0.1] P=esmtp K S=sss id=qwerty1234@disco-zombie.net for a@test.ex +1999-03-02 09:44:33 10HmaY-0005vi-00 DKIM: d=test.ex s=sel c=simple/simple a=rsa-sha256 b=1024 [verification succeeded] +1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@bloggs.com H=(xxx) [127.0.0.1] P=esmtp K S=sss id=qwerty1234@disco-zombie.net for a@test.ex diff --git a/test/scripts/4500-DKIM/4510 b/test/scripts/4500-DKIM/4510 new file mode 100644 index 000000000..938b10e61 --- /dev/null +++ b/test/scripts/4500-DKIM/4510 @@ -0,0 +1,85 @@ +# DKIM signing, with CHUNKING +# +exim -bd -DSERVER=server -oX PORT_S +**** +# +# This should pass. +### sha256, 1024b + message in 1 chunk +# Mail original in aux-fixed/4500.msg2.txt +# Sig generated by: perl aux-fixed/dkim/sign.pl --algorithm=rsa-sha256 \ +# --method=simple/simple < aux-fixed/4500.msg2.txt +client 127.0.0.1 PORT_S +??? 220 +EHLO xxx +??? 250- +??? 250- +??? 250- +??? 250- +??? 250- +??? 250 +MAIL FROM:<CALLER@bloggs.com> +??? 250 +RCPT TO:<a@test.ex> +??? 250 +BDAT 557 LAST +DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=test.ex; h=from:to + :date:message-id:subject; s=sel; bh=ZS4D3qDAC7osugrdWUTQc9HUuaSC + +ScH3/NkwGGOlT0=; b=ncPDYKtCsFuFA7wXHxagsZUh3Rpu0dK6Dl7FbkGykEwU + L/MoAe0D+Aynz+yO0k3d4vGZ6Q2sEJ4MaOZI27ezOSBsBnEhw+0uOaxE6HZew5VD + owfSxfXTkyfJd0CHdtYoXT0OqngTBOtAv87u1T4aLRDY1yAqasVuvLV7V80d4tQ= +From: mrgus@text.ex +To: bakawolf@yahoo.com +Date: Thu, 19 Nov 2015 17:00:07 -0700 +Message-ID: <qwerty1234@disco-zombie.net> +Subject: simple test + +Line 1: This is a simple test. +Line 2: This is a simple test. +??? 250- 557 +??? 250 +QUIT +??? 221 +**** +# +# This should pass. +### sha256, 1024b + message in 2 chunks +# Mail original in aux-fixed/4500.msg2.txt +# Sig generated by: perl aux-fixed/dkim/sign.pl --algorithm=rsa-sha256 \ +# --method=simple/simple < aux-fixed/4500.msg2.txt +client 127.0.0.1 PORT_S +??? 220 +EHLO xxx +??? 250- +??? 250- +??? 250- +??? 250- +??? 250- +??? 250 +MAIL FROM:<CALLER@bloggs.com> +??? 250 +RCPT TO:<a@test.ex> +??? 250 +BDAT 525 +DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=test.ex; h=from:to + :date:message-id:subject; s=sel; bh=ZS4D3qDAC7osugrdWUTQc9HUuaSC + +ScH3/NkwGGOlT0=; b=ncPDYKtCsFuFA7wXHxagsZUh3Rpu0dK6Dl7FbkGykEwU + L/MoAe0D+Aynz+yO0k3d4vGZ6Q2sEJ4MaOZI27ezOSBsBnEhw+0uOaxE6HZew5VD + owfSxfXTkyfJd0CHdtYoXT0OqngTBOtAv87u1T4aLRDY1yAqasVuvLV7V80d4tQ= +From: mrgus@text.ex +To: bakawolf@yahoo.com +Date: Thu, 19 Nov 2015 17:00:07 -0700 +Message-ID: <qwerty1234@disco-zombie.net> +Subject: simple test + +Line 1: This is a simple test. +??? 250 525 +BDAT 32 LAST +Line 2: This is a simple test. +??? 250- 32 +??? 250 +QUIT +??? 221 +**** +millisleep 500 +killdaemon +no_msglog_check diff --git a/test/stderr/4510 b/test/stderr/4510 new file mode 100644 index 000000000..49a0fd875 --- /dev/null +++ b/test/stderr/4510 @@ -0,0 +1,6 @@ +### sha256, 1024b + message in 1 chunk +### sha256, 1024b + message in 2 chunks + +******** SERVER ******** +### sha256, 1024b + message in 1 chunk +### sha256, 1024b + message in 2 chunks diff --git a/test/stdout/4510 b/test/stdout/4510 new file mode 100644 index 000000000..0067c9ff0 --- /dev/null +++ b/test/stdout/4510 @@ -0,0 +1,97 @@ +### sha256, 1024b + message in 1 chunk +Connecting to 127.0.0.1 port 1224 ... connected +??? 220 +<<< 220 testhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +>>> EHLO xxx +??? 250- +<<< 250-testhost.test.ex Hello xxx [127.0.0.1] +??? 250- +<<< 250-SIZE 52428800 +??? 250- +<<< 250-8BITMIME +??? 250- +<<< 250-PIPELINING +??? 250- +<<< 250-CHUNKING +??? 250 +<<< 250 HELP +>>> MAIL FROM:<CALLER@bloggs.com> +??? 250 +<<< 250 OK +>>> RCPT TO:<a@test.ex> +??? 250 +<<< 250 Accepted +>>> BDAT 557 LAST +>>> DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=test.ex; h=from:to +>>> :date:message-id:subject; s=sel; bh=ZS4D3qDAC7osugrdWUTQc9HUuaSC +>>> +ScH3/NkwGGOlT0=; b=ncPDYKtCsFuFA7wXHxagsZUh3Rpu0dK6Dl7FbkGykEwU +>>> L/MoAe0D+Aynz+yO0k3d4vGZ6Q2sEJ4MaOZI27ezOSBsBnEhw+0uOaxE6HZew5VD +>>> owfSxfXTkyfJd0CHdtYoXT0OqngTBOtAv87u1T4aLRDY1yAqasVuvLV7V80d4tQ= +>>> From: mrgus@text.ex +>>> To: bakawolf@yahoo.com +>>> Date: Tue, 2 Mar 1999 09:44:33 +0000 +>>> Message-ID: <qwerty1234@disco-zombie.net> +>>> Subject: simple test +>>> +>>> Line 1: This is a simple test. +>>> Line 2: This is a simple test. +??? 250- 557 +<<< 250- 557 byte chunk, total 557 +??? 250 +<<< 250 OK id=10HmaX-0005vi-00 +>>> QUIT +??? 221 +<<< 221 testhost.test.ex closing connection +End of script +### sha256, 1024b + message in 2 chunks +Connecting to 127.0.0.1 port 1224 ... connected +??? 220 +<<< 220 testhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +>>> EHLO xxx +??? 250- +<<< 250-testhost.test.ex Hello xxx [127.0.0.1] +??? 250- +<<< 250-SIZE 52428800 +??? 250- +<<< 250-8BITMIME +??? 250- +<<< 250-PIPELINING +??? 250- +<<< 250-CHUNKING +??? 250 +<<< 250 HELP +>>> MAIL FROM:<CALLER@bloggs.com> +??? 250 +<<< 250 OK +>>> RCPT TO:<a@test.ex> +??? 250 +<<< 250 Accepted +>>> BDAT 525 +>>> DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=test.ex; h=from:to +>>> :date:message-id:subject; s=sel; bh=ZS4D3qDAC7osugrdWUTQc9HUuaSC +>>> +ScH3/NkwGGOlT0=; b=ncPDYKtCsFuFA7wXHxagsZUh3Rpu0dK6Dl7FbkGykEwU +>>> L/MoAe0D+Aynz+yO0k3d4vGZ6Q2sEJ4MaOZI27ezOSBsBnEhw+0uOaxE6HZew5VD +>>> owfSxfXTkyfJd0CHdtYoXT0OqngTBOtAv87u1T4aLRDY1yAqasVuvLV7V80d4tQ= +>>> From: mrgus@text.ex +>>> To: bakawolf@yahoo.com +>>> Date: Tue, 2 Mar 1999 09:44:33 +0000 +>>> Message-ID: <qwerty1234@disco-zombie.net> +>>> Subject: simple test +>>> +>>> Line 1: This is a simple test. +??? 250 525 +<<< 250 525 byte chunk received +>>> BDAT 32 LAST +>>> Line 2: This is a simple test. +??? 250- 32 +<<< 250- 32 byte chunk, total 557 +??? 250 +<<< 250 OK id=10HmaY-0005vi-00 +>>> QUIT +??? 221 +<<< 221 testhost.test.ex closing connection +End of script + +******** SERVER ******** +### sha256, 1024b + message in 1 chunk +### sha256, 1024b + message in 2 chunks |