Testsuite: testcase for DKIM bug 2029
authorJeremy Harris <jgh146exb@wizmail.org>
Sat, 28 Jan 2017 14:21:19 +0000 (14:21 +0000)
committerJeremy Harris <jgh146exb@wizmail.org>
Sat, 28 Jan 2017 14:21:19 +0000 (14:21 +0000)
17 files changed:
test/confs/4506 [new symlink]
test/confs/4520 [moved from test/confs/4503 with 96% similarity]
test/confs/4521 [moved from test/confs/4509 with 100% similarity]
test/confs/4522 [moved from test/confs/4510 with 100% similarity]
test/log/4506 [new file with mode: 0644]
test/log/4520 [moved from test/log/4503 with 100% similarity]
test/log/4521 [moved from test/log/4509 with 100% similarity]
test/log/4522 [moved from test/log/4510 with 100% similarity]
test/scripts/4500-DKIM/4506 [new file with mode: 0644]
test/scripts/4500-DKIM/4520 [moved from test/scripts/4500-DKIM/4503 with 100% similarity]
test/scripts/4500-DKIM/4521 [moved from test/scripts/4500-DKIM/4509 with 99% similarity]
test/scripts/4500-DKIM/4522 [moved from test/scripts/4500-DKIM/4510 with 98% similarity]
test/src/client.c
test/stderr/4520 [moved from test/stderr/4503 with 100% similarity]
test/stderr/4521 [moved from test/stderr/4509 with 100% similarity]
test/stderr/4522 [moved from test/stderr/4510 with 100% similarity]
test/stdout/4522 [moved from test/stdout/4510 with 100% similarity]

diff --git a/test/confs/4506 b/test/confs/4506
new file mode 120000 (symlink)
index 0000000..c4f73ba
--- /dev/null
@@ -0,0 +1 @@
+4500
\ No newline at end of file
similarity index 96%
rename from test/confs/4503
rename to test/confs/4520
index cbd82d8f5ba56c086990651bb85663a17172e526..70454c33c904acb99962d6feaa80e0abf50fe4d9 100644 (file)
@@ -1,4 +1,4 @@
-# Exim test configuration 4503
+# Exim test configuration 4520
 
 SERVER=
 OPT=
similarity index 100%
rename from test/confs/4509
rename to test/confs/4521
similarity index 100%
rename from test/confs/4510
rename to test/confs/4522
diff --git a/test/log/4506 b/test/log/4506
new file mode 100644 (file)
index 0000000..d50bbe1
--- /dev/null
@@ -0,0 +1,9 @@
+
+******** SERVER ********
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
+1999-03-02 09:44:33 10HmaX-0005vi-00 DKIM: d=test.ex s=sel c=simple/simple a=rsa-sha1 b=0 [invalid - signature tag missing or invalid]
+1999-03-02 09:44:33 10HmaX-0005vi-00 signer: test.ex bits: 0
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@bloggs.com H=(xxx) [127.0.0.1] P=smtp S=sss id=qwerty1234@disco-zombie.net
+1999-03-02 09:44:33 10HmaY-0005vi-00 DKIM: d=test.ex s=sel c=simple/simple a=rsa-sha1 b=1024 [verification failed - body hash mismatch (body probably modified in transit)]
+1999-03-02 09:44:33 10HmaY-0005vi-00 signer: test.ex bits: 1024
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@bloggs.com H=(xxx) [127.0.0.1] P=smtp S=sss id=qwerty1234@disco-zombie.net
similarity index 100%
rename from test/log/4503
rename to test/log/4520
similarity index 100%
rename from test/log/4509
rename to test/log/4521
similarity index 100%
rename from test/log/4510
rename to test/log/4522
diff --git a/test/scripts/4500-DKIM/4506 b/test/scripts/4500-DKIM/4506
new file mode 100644 (file)
index 0000000..b2d53e8
--- /dev/null
@@ -0,0 +1,105 @@
+# DKIM verify, errors
+#
+exim -d-all+acl -DSERVER=server -bd -oX PORT_D
+****
+#
+# This should fail verify (missing header hash in sig header)
+#  - sha1, 1024b
+# Mail original in aux-fixed/4500.msg1.txt
+# Sig generated 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:<CALLER@bloggs.com>
+??? 250
+RCPT TO:<a@test.ex>
+??? 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=;
+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
+
+This is a simple test.
+.
+??? 250
+QUIT
+??? 221
+****
+#
+#
+# This should fail verify (missing body hash in sig header)
+#  - sha1, 1024b
+# Mail original in aux-fixed/4500.msg1.txt
+# Sig generated 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:<CALLER@bloggs.com>
+??? 250
+RCPT TO:<a@test.ex>
+??? 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; 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: <qwerty1234@disco-zombie.net>
+Subject: simple test
+
+This is a simple test.
+.
+??? 250
+QUIT
+??? 221
+****
+#
+#
+# This should fail verify (missing body)
+#  - sha1, 1024b
+# Mail original in aux-fixed/4500.msg1.txt
+# Sig generated 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:<CALLER@bloggs.com>
+??? 250
+RCPT TO:<a@test.ex>
+??? 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: <qwerty1234@disco-zombie.net>
+Subject: simple test
+.
+??? 250
+QUIT
+??? 221
+****
+#
+#
+#
+#
+#
+killdaemon
+no_stdout_check
+no_msglog_check
similarity index 99%
rename from test/scripts/4500-DKIM/4509
rename to test/scripts/4500-DKIM/4521
index 3447fa10bbbda2ec189fda0770013a37e8b2e807..7b341521f0978065187e9af925c30505ae03e85c 100644 (file)
@@ -1,4 +1,4 @@
-# DKIM signing, with CHUNKING
+# DKIM signing, with CHUNKING, stdin
 #
 exim -bd -DSERVER=server -oX PORT_S
 ****
similarity index 98%
rename from test/scripts/4500-DKIM/4510
rename to test/scripts/4500-DKIM/4522
index 938b10e61b3870f0ea783e60d95697301fa4c238..e8924b84e12e1664f24b1bc429f8b8fc28735427 100644 (file)
@@ -1,4 +1,4 @@
-# DKIM signing, with CHUNKING
+# DKIM signing, with CHUNKING, smtp/tcp
 #
 exim -bd -DSERVER=server -oX PORT_S
 ****
index c1ac6b7f15a812c61053189c8182e2499b663e0d..f34cf784c9a671c0f1d84d24a81da75f648680e3 100644 (file)
@@ -939,7 +939,7 @@ while (fgets(CS outbuffer, sizeof(outbuffer), stdin) != NULL)
          }
        else
          {
-         printf("Enexpected EOF read\n");
+         printf("Unexpected EOF read\n");
          close(sock);
          exit(80);
          }
similarity index 100%
rename from test/stderr/4503
rename to test/stderr/4520
similarity index 100%
rename from test/stderr/4509
rename to test/stderr/4521
similarity index 100%
rename from test/stderr/4510
rename to test/stderr/4522
similarity index 100%
rename from test/stdout/4510
rename to test/stdout/4522