From d083e3f2af9baf1910a69c1cc4a06a26be99d40c Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sun, 18 Jul 2021 15:51:16 +0100 Subject: ALPN: feature macro --- test/scripts/1100-Basic-TLS/1115 | 50 --------------------------------- test/scripts/1190-TLS-ALPN/1190 | 50 +++++++++++++++++++++++++++++++++ test/scripts/1190-TLS-ALPN/REQUIRES | 1 + test/scripts/2000-GnuTLS/2038 | 36 ------------------------ test/scripts/2090-GnuTLS-ALPN/2090 | 36 ++++++++++++++++++++++++ test/scripts/2090-GnuTLS-ALPN/REQUIRES | 3 ++ test/scripts/2100-OpenSSL/2138 | 35 ----------------------- test/scripts/2190-OpenSSL-ALPN/2190 | 35 +++++++++++++++++++++++ test/scripts/2190-OpenSSL-ALPN/REQUIRES | 3 ++ 9 files changed, 128 insertions(+), 121 deletions(-) delete mode 100644 test/scripts/1100-Basic-TLS/1115 create mode 100644 test/scripts/1190-TLS-ALPN/1190 create mode 100644 test/scripts/1190-TLS-ALPN/REQUIRES delete mode 100644 test/scripts/2000-GnuTLS/2038 create mode 100644 test/scripts/2090-GnuTLS-ALPN/2090 create mode 100644 test/scripts/2090-GnuTLS-ALPN/REQUIRES delete mode 100644 test/scripts/2100-OpenSSL/2138 create mode 100644 test/scripts/2190-OpenSSL-ALPN/2190 create mode 100644 test/scripts/2190-OpenSSL-ALPN/REQUIRES (limited to 'test/scripts') diff --git a/test/scripts/1100-Basic-TLS/1115 b/test/scripts/1100-Basic-TLS/1115 deleted file mode 100644 index d74caca52..000000000 --- a/test/scripts/1100-Basic-TLS/1115 +++ /dev/null @@ -1,50 +0,0 @@ -# TLS: ALPN -gnutls -exim -DSERVER=server -bd -oX PORT_D -**** -# -# Basic: is good ALPN set on tpt acceptable to server -exim -DCONTROL=smtp -odf a@test.ex -Test message. -**** -# -# Bad ALPN rejected -exim -DCONTROL=http -odf b@test.ex -**** -exim -Mrm $msg1 -**** -sudo rm -f DIR/spool/db/retry -# -# Multiple ALPN rejected -exim -DCONTROL=smtp:smtp -odf c@test.ex -**** -exim -Mrm $msg1 -**** -sudo rm -f DIR/spool/db/retry -# -# Empty client option is ok -exim -DCONTROL="" -odf d@test.ex -**** -# Content-free client option is ok -exim -DCONTROL=" " -odf e@test.ex -**** -killdaemon -# -# Server can be told to ignore (bad) ALPN from client -exim -DSERVER=server -DSTRICT="" -bd -oX PORT_D -**** -exim -DCONTROL=http -odf f@test.ex -**** -killdaemon -# -# Server can be told custom names list -exim -DSERVER=server -DSTRICT='${if eq {$sender_host_address}{HOSTIPV4} {smtp:weird} {smtp}}' -bd -oX PORT_D -**** -exim -DCONTROL=weird -odf g@test.ex -**** -killdaemon -# -# -no_msglog_check -no_stdout_check -millisleep 500 diff --git a/test/scripts/1190-TLS-ALPN/1190 b/test/scripts/1190-TLS-ALPN/1190 new file mode 100644 index 000000000..d74caca52 --- /dev/null +++ b/test/scripts/1190-TLS-ALPN/1190 @@ -0,0 +1,50 @@ +# TLS: ALPN +gnutls +exim -DSERVER=server -bd -oX PORT_D +**** +# +# Basic: is good ALPN set on tpt acceptable to server +exim -DCONTROL=smtp -odf a@test.ex +Test message. +**** +# +# Bad ALPN rejected +exim -DCONTROL=http -odf b@test.ex +**** +exim -Mrm $msg1 +**** +sudo rm -f DIR/spool/db/retry +# +# Multiple ALPN rejected +exim -DCONTROL=smtp:smtp -odf c@test.ex +**** +exim -Mrm $msg1 +**** +sudo rm -f DIR/spool/db/retry +# +# Empty client option is ok +exim -DCONTROL="" -odf d@test.ex +**** +# Content-free client option is ok +exim -DCONTROL=" " -odf e@test.ex +**** +killdaemon +# +# Server can be told to ignore (bad) ALPN from client +exim -DSERVER=server -DSTRICT="" -bd -oX PORT_D +**** +exim -DCONTROL=http -odf f@test.ex +**** +killdaemon +# +# Server can be told custom names list +exim -DSERVER=server -DSTRICT='${if eq {$sender_host_address}{HOSTIPV4} {smtp:weird} {smtp}}' -bd -oX PORT_D +**** +exim -DCONTROL=weird -odf g@test.ex +**** +killdaemon +# +# +no_msglog_check +no_stdout_check +millisleep 500 diff --git a/test/scripts/1190-TLS-ALPN/REQUIRES b/test/scripts/1190-TLS-ALPN/REQUIRES new file mode 100644 index 000000000..44d5cc0cb --- /dev/null +++ b/test/scripts/1190-TLS-ALPN/REQUIRES @@ -0,0 +1 @@ +feature _HAVE_TLS_ALPN diff --git a/test/scripts/2000-GnuTLS/2038 b/test/scripts/2000-GnuTLS/2038 deleted file mode 100644 index 227af8475..000000000 --- a/test/scripts/2000-GnuTLS/2038 +++ /dev/null @@ -1,36 +0,0 @@ -# TLS: ALPN: mandatory -# Separated from the OpenSSL equivalent as we deliberately send a Fatal Alert, and that gets logged by the receiver -# OpenSSL does not provides the facility. -gnutls -exim -DSERVER=server -bd -oX PORT_D -**** -# Client requires ALPN (success) -exim -DCONTROL=smtp -DREQUIRE=y -odf client_require@test.ex -**** -killdaemon -# -# Server can be told to ignore (bad) ALPN from client -exim -DSERVER=server -DSTRICT="" -bd -oX PORT_D -**** -# Client requires ALPN (fail) -exim -DCONTROL=http -DREQUIRE=y -odf client_require_fail@test.ex -**** -exim -Mrm $msg1 -**** -sudo rm -f DIR/spool/db/retry -killdaemon -# -# -# Server can be told ALPN mandatory -exim -DSERVER=server -DREQUIRE=y -bd -oX PORT_D -**** -# Client supplies ALPN, good -exim -DCONTROL=smtp -odf server_require_good@test.ex -**** -# Client does not supply ALPN, fails -exim -odf server_require_bad@test.ex -**** -killdaemon -# -no_msglog_check -no_stdout_check diff --git a/test/scripts/2090-GnuTLS-ALPN/2090 b/test/scripts/2090-GnuTLS-ALPN/2090 new file mode 100644 index 000000000..227af8475 --- /dev/null +++ b/test/scripts/2090-GnuTLS-ALPN/2090 @@ -0,0 +1,36 @@ +# TLS: ALPN: mandatory +# Separated from the OpenSSL equivalent as we deliberately send a Fatal Alert, and that gets logged by the receiver +# OpenSSL does not provides the facility. +gnutls +exim -DSERVER=server -bd -oX PORT_D +**** +# Client requires ALPN (success) +exim -DCONTROL=smtp -DREQUIRE=y -odf client_require@test.ex +**** +killdaemon +# +# Server can be told to ignore (bad) ALPN from client +exim -DSERVER=server -DSTRICT="" -bd -oX PORT_D +**** +# Client requires ALPN (fail) +exim -DCONTROL=http -DREQUIRE=y -odf client_require_fail@test.ex +**** +exim -Mrm $msg1 +**** +sudo rm -f DIR/spool/db/retry +killdaemon +# +# +# Server can be told ALPN mandatory +exim -DSERVER=server -DREQUIRE=y -bd -oX PORT_D +**** +# Client supplies ALPN, good +exim -DCONTROL=smtp -odf server_require_good@test.ex +**** +# Client does not supply ALPN, fails +exim -odf server_require_bad@test.ex +**** +killdaemon +# +no_msglog_check +no_stdout_check diff --git a/test/scripts/2090-GnuTLS-ALPN/REQUIRES b/test/scripts/2090-GnuTLS-ALPN/REQUIRES new file mode 100644 index 000000000..878f1a3c0 --- /dev/null +++ b/test/scripts/2090-GnuTLS-ALPN/REQUIRES @@ -0,0 +1,3 @@ +support GnuTLS +running IPv4 +feature _HAVE_TLS_ALPN diff --git a/test/scripts/2100-OpenSSL/2138 b/test/scripts/2100-OpenSSL/2138 deleted file mode 100644 index 7dadb3051..000000000 --- a/test/scripts/2100-OpenSSL/2138 +++ /dev/null @@ -1,35 +0,0 @@ -# TLS: ALPN: mandatory -# -# Plain server -exim -DSERVER=server -bd -oX PORT_D -**** -# Client requires ALPN (success) -exim -DCONTROL=smtp -DREQUIRE=y -odf client_require@test.ex -**** -killdaemon -# -# Server can be told to ignore (bad) ALPN from client -exim -DSERVER=server -DSTRICT="" -bd -oX PORT_D -**** -# Client requires ALPN (fail) -exim -DCONTROL=http -DREQUIRE=y -odf client_require_fail@test.ex -**** -exim -Mrm $msg1 -**** -sudo rm -f DIR/spool/db/retry -killdaemon -# -# -# Server can be told ALPN mandatory -exim -DSERVER=server -DREQUIRE=y -bd -oX PORT_D -**** -# Client supplies ALPN, good -exim -DCONTROL=smtp -odf server_require_good@test.ex -**** -# Client does not supply ALPN, fails -exim -odf server_require_bad@test.ex -**** -killdaemon -# -no_msglog_check -no_stdout_check diff --git a/test/scripts/2190-OpenSSL-ALPN/2190 b/test/scripts/2190-OpenSSL-ALPN/2190 new file mode 100644 index 000000000..7dadb3051 --- /dev/null +++ b/test/scripts/2190-OpenSSL-ALPN/2190 @@ -0,0 +1,35 @@ +# TLS: ALPN: mandatory +# +# Plain server +exim -DSERVER=server -bd -oX PORT_D +**** +# Client requires ALPN (success) +exim -DCONTROL=smtp -DREQUIRE=y -odf client_require@test.ex +**** +killdaemon +# +# Server can be told to ignore (bad) ALPN from client +exim -DSERVER=server -DSTRICT="" -bd -oX PORT_D +**** +# Client requires ALPN (fail) +exim -DCONTROL=http -DREQUIRE=y -odf client_require_fail@test.ex +**** +exim -Mrm $msg1 +**** +sudo rm -f DIR/spool/db/retry +killdaemon +# +# +# Server can be told ALPN mandatory +exim -DSERVER=server -DREQUIRE=y -bd -oX PORT_D +**** +# Client supplies ALPN, good +exim -DCONTROL=smtp -odf server_require_good@test.ex +**** +# Client does not supply ALPN, fails +exim -odf server_require_bad@test.ex +**** +killdaemon +# +no_msglog_check +no_stdout_check diff --git a/test/scripts/2190-OpenSSL-ALPN/REQUIRES b/test/scripts/2190-OpenSSL-ALPN/REQUIRES new file mode 100644 index 000000000..d97fd9744 --- /dev/null +++ b/test/scripts/2190-OpenSSL-ALPN/REQUIRES @@ -0,0 +1,3 @@ +support OpenSSL +running IPv4 +feature _HAVE_TLS_ALPN -- cgit v1.2.3