summaryrefslogtreecommitdiff
path: root/test/scripts/1100-Basic-TLS
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2021-01-21 13:06:31 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2021-01-21 17:33:35 +0000
commit0240e7a160721a53365aaa3bd10bb6f3de3f9f15 (patch)
tree6ad59913243585bc5dc451b22063f3ffcba195cd /test/scripts/1100-Basic-TLS
parent4718c75d346777872c87ff7d4fe0431487e618c4 (diff)
Testsuite: TLS server testcase consolidation
Diffstat (limited to 'test/scripts/1100-Basic-TLS')
-rw-r--r--test/scripts/1100-Basic-TLS/110350
-rw-r--r--test/scripts/1100-Basic-TLS/110444
-rw-r--r--test/scripts/1100-Basic-TLS/110529
-rw-r--r--test/scripts/1100-Basic-TLS/110618
-rw-r--r--test/scripts/1100-Basic-TLS/110732
-rw-r--r--test/scripts/1100-Basic-TLS/110845
-rw-r--r--test/scripts/1100-Basic-TLS/11097
-rw-r--r--test/scripts/1100-Basic-TLS/111041
-rw-r--r--test/scripts/1100-Basic-TLS/111122
-rw-r--r--test/scripts/1100-Basic-TLS/111233
-rw-r--r--test/scripts/1100-Basic-TLS/111310
-rw-r--r--test/scripts/1100-Basic-TLS/111472
-rw-r--r--test/scripts/1100-Basic-TLS/114915
13 files changed, 418 insertions, 0 deletions
diff --git a/test/scripts/1100-Basic-TLS/1103 b/test/scripts/1100-Basic-TLS/1103
new file mode 100644
index 000000000..d8441dc40
--- /dev/null
+++ b/test/scripts/1100-Basic-TLS/1103
@@ -0,0 +1,50 @@
+# TLS server: unavailable cipher
+gnutls
+exim -DSERVER=server -bd -oX PORT_D
+****
+client-anytls HOSTIPV4 PORT_D
+??? 220
+ehlo rhu.barb
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250
+starttls
+??? 220
+mail from:<userx@test.ex>
+??? 250
+rcpt to:<userx@test.ex>
+??? 550
+quit
+??? 221
+****
+client-anytls 127.0.0.1 PORT_D
+??? 220
+ehlo rhu.barb
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250
+starttls
+??? 220
+helo rhu.barb
+??? 250
+mail from:<userx@test.ex>
+??? 250
+rcpt to:<userx@test.ex>
+??? 250
+DATA
+??? 3
+This is a test encrypted message.
+.
+??? 250
+quit
+??? 221
+****
+killdaemon
+exim -qf
+****
diff --git a/test/scripts/1100-Basic-TLS/1104 b/test/scripts/1100-Basic-TLS/1104
new file mode 100644
index 000000000..4a3af17ee
--- /dev/null
+++ b/test/scripts/1100-Basic-TLS/1104
@@ -0,0 +1,44 @@
+# TLS server: TLS required
+gnutls
+exim -DSERVER=server -bd -oX PORT_D
+****
+client-anytls 127.0.0.1 PORT_D
+??? 220
+ehlo rhu.barb
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250
+mail from:<userx@test.ex>
+??? 250
+rcpt to:<userx@test.ex>
+??? 550
+quit
+??? 221
+****
+client-anytls HOSTIPV4 PORT_D
+??? 220
+ehlo rhu.barb
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250
+mail from:<userx@test.ex>
+??? 250
+rcpt to:<userx@test.ex>
+??? 250
+DATA
+??? 3
+This is a test unencrypted message.
+.
+??? 250
+quit
+??? 221
+****
+killdaemon
+exim -qf
+****
diff --git a/test/scripts/1100-Basic-TLS/1105 b/test/scripts/1100-Basic-TLS/1105
new file mode 100644
index 000000000..fe06d2cab
--- /dev/null
+++ b/test/scripts/1100-Basic-TLS/1105
@@ -0,0 +1,29 @@
+# TLS server: accept for relay if encrypted
+gnutls
+exim -DSERVER=server -bd -oX PORT_D
+****
+client-anytls 127.0.0.1 PORT_D
+??? 220
+mail from:<userx@test.ex>
+??? 250
+rcpt to:<userx@remote.test.ex>
+??? 550
+ehlo rhu.barb
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250
+starttls
+??? 220
+mail from:<userx@test.ex>
+??? 250
+rcpt to:<userx@remote.test.ex>
+??? 250
+quit
+??? 221
+****
+killdaemon
+exim -qf
+****
diff --git a/test/scripts/1100-Basic-TLS/1106 b/test/scripts/1100-Basic-TLS/1106
new file mode 100644
index 000000000..1b8438f7e
--- /dev/null
+++ b/test/scripts/1100-Basic-TLS/1106
@@ -0,0 +1,18 @@
+# TLS server: timeout in TLS session
+gnutls
+exim -DSERVER=server -bd -oX PORT_D
+****
+client-anytls 127.0.0.1 PORT_D
+??? 220
+ehlo rhu.barb
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250
+starttls
+??? 220
++++ 3
+****
+killdaemon
diff --git a/test/scripts/1100-Basic-TLS/1107 b/test/scripts/1100-Basic-TLS/1107
new file mode 100644
index 000000000..79d412d70
--- /dev/null
+++ b/test/scripts/1100-Basic-TLS/1107
@@ -0,0 +1,32 @@
+# TLS server: timeout or close after accepting STARTTLS
+gnutls
+exim -DSERVER=server -bd -oX PORT_D
+****
+client-anytls 127.0.0.1 PORT_D
+??? 220
+ehlo timeout.rhu.barb
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250
+starttls_wait
+??? 220
++++ 2
+??? 421
+****
+client-anytls 127.0.0.1 PORT_D
+??? 220
+ehlo close.rhu.barb
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250
+starttls_wait
+??? 220
+****
+millisleep 500
+killdaemon
diff --git a/test/scripts/1100-Basic-TLS/1108 b/test/scripts/1100-Basic-TLS/1108
new file mode 100644
index 000000000..7da4f444b
--- /dev/null
+++ b/test/scripts/1100-Basic-TLS/1108
@@ -0,0 +1,45 @@
+# TLS ACL encryption test
+gnutls
+exim -DSERVER=server -bd -oX PORT_D
+****
+client-anytls 127.0.0.1 PORT_D
+??? 220
+ehlo rhu.barb
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250
+starttls
+??? 220
+mail from:<userx@test.ex>
+??? 250
+rcpt to:<userx@test.ex>
+??? 250
+DATA
+??? 3
+This is a test encrypted message.
+.
+??? 250
+quit
+??? 221
+****
+client-anytls 127.0.0.1 PORT_D
+??? 220
+ehlo rhu.barb
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250
+mail from:<userx@test.ex>
+??? 250
+rcpt to:<userx@test.ex>
+??? 550
+quit
+??? 221
+****
+killdaemon
+no_msglog_check
diff --git a/test/scripts/1100-Basic-TLS/1109 b/test/scripts/1100-Basic-TLS/1109
new file mode 100644
index 000000000..395fcdcde
--- /dev/null
+++ b/test/scripts/1100-Basic-TLS/1109
@@ -0,0 +1,7 @@
+# TLS: ACL for STARTTLS
+gnutls
+exim -bs -oMa 10.9.8.10
+ehlo a.b.c
+starttls
+quit
+****
diff --git a/test/scripts/1100-Basic-TLS/1110 b/test/scripts/1100-Basic-TLS/1110
new file mode 100644
index 000000000..865b2202f
--- /dev/null
+++ b/test/scripts/1100-Basic-TLS/1110
@@ -0,0 +1,41 @@
+# TLS server: -tls-on-connect
+gnutls
+exim -DSERVER=server -tls-on-connect -bd -oX PORT_D
+****
+client-anytls -tls-on-connect 127.0.0.1 PORT_D
+??? 220
+ehlo rhu.barb
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250
+mail from:<userx@test.ex>
+??? 250
+rcpt to:<userx@test.ex>
+??? 250
+DATA
+??? 3
+This is a test encrypted message.
+.
+??? 250
+quit
+??? 221
+****
+client-anytls -tls-on-connect HOSTIPV4 PORT_D aux-fixed/cert2 aux-fixed/cert2
+??? 220
+mail from:<userx@test.ex>
+??? 250
+rcpt to:<userx@test.ex>
+??? 250
+DATA
+??? 3
+This is a test encrypted message from a verified host.
+.
+??? 250
+quit
+??? 221
+****
+killdaemon
+exim -qf
+****
diff --git a/test/scripts/1100-Basic-TLS/1111 b/test/scripts/1100-Basic-TLS/1111
new file mode 100644
index 000000000..f36360d8f
--- /dev/null
+++ b/test/scripts/1100-Basic-TLS/1111
@@ -0,0 +1,22 @@
+# TLS server: help command in encrypted session
+gnutls
+exim -DSERVER=server -bd -oX PORT_D
+****
+client-anytls HOSTIPV4 PORT_D
+??? 220
+ehlo rhu.barb
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250
+starttls
+??? 220
+help
+??? 214-
+??? 214
+quit
+??? 221
+****
+killdaemon
diff --git a/test/scripts/1100-Basic-TLS/1112 b/test/scripts/1100-Basic-TLS/1112
new file mode 100644
index 000000000..396ee3fef
--- /dev/null
+++ b/test/scripts/1100-Basic-TLS/1112
@@ -0,0 +1,33 @@
+# tls_on_connect_ports
+need_ipv4
+#
+gnutls
+exim -DSERVER=server -bd -oX PORT_D:PORT_D2:PORT_D3
+****
+client-anytls 127.0.0.1 PORT_D
+??? 220
+ehlo rhu.barb
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250
+starttls
+??? 220
+quit
+??? 221
+****
+client-anytls -tls-on-connect 127.0.0.1 PORT_D2
+??? 220
+ehlo rhu.barb
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250
+quit
+??? 221
+****
+killdaemon
+no_msglog_check
diff --git a/test/scripts/1100-Basic-TLS/1113 b/test/scripts/1100-Basic-TLS/1113
new file mode 100644
index 000000000..b009d476b
--- /dev/null
+++ b/test/scripts/1100-Basic-TLS/1113
@@ -0,0 +1,10 @@
+# TLS: SNI
+gnutls
+exim -DSERVER=server -bd -oX PORT_D
+****
+# Basic: is SNI set on tpt seen by server
+exim CALLER@test.ex
+Test message.
+****
+sleep 1
+killdaemon
diff --git a/test/scripts/1100-Basic-TLS/1114 b/test/scripts/1100-Basic-TLS/1114
new file mode 100644
index 000000000..47badfe42
--- /dev/null
+++ b/test/scripts/1100-Basic-TLS/1114
@@ -0,0 +1,72 @@
+# TLS server, CHUNKING reception
+gnutls
+exim -DSERVER=server -DSRV=tls -bd -oX PORT_D
+****
+#
+# non-piplined
+client-anytls 127.0.0.1 PORT_D
+??? 220
+EHLO rhu.barb
+??? 250-
+??? 250-SIZE
+??? 250-8BITMIME
+??? 250-PIPELINING
+??? 250-CHUNKING
+??? 250-STARTTLS
+??? 250 HELP
+STARTTLS
+??? 220
+EHLO rhu.barb
+??? 250-
+??? 250-SIZE
+??? 250-8BITMIME
+??? 250-PIPELINING
+??? 250-CHUNKING
+??? 250 HELP
+MAIL FROM:<someone@some.domain>
+??? 250
+RCPT TO:<CALLER@test.ex>
+??? 250
+BDAT 88 LAST
+To: Susan@random.com
+From: Sam@random.com
+Subject: This is a bodyless test message
+
+??? 250-
+??? 250
+QUIT
+??? 221
+****
+#
+# pipelined
+client-anytls 127.0.0.1 PORT_D
+??? 220
+EHLO rhu.barb
+??? 250-
+??? 250-SIZE
+??? 250-8BITMIME
+??? 250-PIPELINING
+??? 250-CHUNKING
+??? 250-STARTTLS
+??? 250 HELP
+STARTTLS
+??? 220
+EHLO rhu.barb
+??? 250-
+??? 250-SIZE
+??? 250-8BITMIME
+??? 250-PIPELINING
+??? 250-CHUNKING
+??? 250 HELP
+MAIL FROM:<someone@some.domain>\r\nRCPT TO:<CALLER@test.ex>\r\nBDAT 88 LAST\r\nTo: Susan@random.com\r\nFrom: Sam@random.com\r\nSubject: This is a bodyless test message\r\n
+??? 250
+??? 250
+??? 250-
+??? 250
+QUIT
+??? 221
+****
+#
+#
+killdaemon
+no_msglog_check
diff --git a/test/scripts/1100-Basic-TLS/1149 b/test/scripts/1100-Basic-TLS/1149
new file mode 100644
index 000000000..501a9c9da
--- /dev/null
+++ b/test/scripts/1100-Basic-TLS/1149
@@ -0,0 +1,15 @@
+# ${readsocket (IPv4 TLS)
+need_ipv4
+#
+exim -DSERVER=server -tls-on-connect -bd -oX PORT_D
+****
+#
+#
+millisleep 500
+exim -be
+1 >>${readsocket{inet:thisloop:PORT_D}{QUIT\n}{2s:tls=yes}}<<
+****
+millisleep 500
+#
+killdaemon
+no_stderr_check