summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2021-07-18 15:51:16 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2021-07-18 15:54:05 +0100
commitd083e3f2af9baf1910a69c1cc4a06a26be99d40c (patch)
tree1a533c9006f99f0ef1462a7494ff08de4ed3a7b7
parentb634f8eaf52aae84c311d7e306f38f3dc07ff1b0 (diff)
ALPN: feature macro
-rw-r--r--doc/doc-docbook/spec.xfpt3
-rw-r--r--src/src/tls-gnu.c3
-rw-r--r--src/src/tls-openssl.c3
-rw-r--r--test/confs/1190 (renamed from test/confs/1115)2
l---------test/confs/20381
l---------test/confs/20901
l---------test/confs/21381
l---------test/confs/21901
-rw-r--r--test/log/1190 (renamed from test/log/1115)0
-rw-r--r--test/log/2090 (renamed from test/log/2038)0
-rw-r--r--test/log/2190 (renamed from test/log/2138)0
-rw-r--r--test/scripts/1190-TLS-ALPN/1190 (renamed from test/scripts/1100-Basic-TLS/1115)0
-rw-r--r--test/scripts/1190-TLS-ALPN/REQUIRES1
-rw-r--r--test/scripts/2090-GnuTLS-ALPN/2090 (renamed from test/scripts/2000-GnuTLS/2038)0
-rw-r--r--test/scripts/2090-GnuTLS-ALPN/REQUIRES3
-rw-r--r--test/scripts/2190-OpenSSL-ALPN/2190 (renamed from test/scripts/2100-OpenSSL/2138)0
-rw-r--r--test/scripts/2190-OpenSSL-ALPN/REQUIRES3
17 files changed, 18 insertions, 4 deletions
diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt
index 2687f6048..fef3dfce6 100644
--- a/doc/doc-docbook/spec.xfpt
+++ b/doc/doc-docbook/spec.xfpt
@@ -29953,7 +29953,8 @@ depends on the behavious of the peer
(not all peers can send a feature-specific TLS Alert).
This feature is available when Exim is built with
-OpenSSL 1.1.0 or later or GnuTLS 3.2.0 or later.
+OpenSSL 1.1.0 or later or GnuTLS 3.2.0 or later;
+the macro _HAVE_TLS_ALPN will be defined when this is so.
.wen
diff --git a/src/src/tls-gnu.c b/src/src/tls-gnu.c
index f63a8375b..b9f8d2a51 100644
--- a/src/src/tls-gnu.c
+++ b/src/src/tls-gnu.c
@@ -154,6 +154,9 @@ builtin_macro_create(US"_HAVE_TLS_OCSP_LIST");
#if defined(EXIM_HAVE_INOTIFY) || defined(EXIM_HAVE_KEVENT)
builtin_macro_create(US"_HAVE_TLS_CA_CACHE");
# endif
+# ifdef EXIM_HAVE_ALPN
+builtin_macro_create(US"_HAVE_TLS_ALPN");
+# endif
}
#else
diff --git a/src/src/tls-openssl.c b/src/src/tls-openssl.c
index d9ec82dc2..5bf6a6002 100644
--- a/src/src/tls-openssl.c
+++ b/src/src/tls-openssl.c
@@ -307,6 +307,9 @@ builtin_macro_create(US"_TLS_BAD_MULTICERT_IN_OURCERT");
builtin_macro_create(US"_HAVE_TLS_OCSP");
builtin_macro_create(US"_HAVE_TLS_OCSP_LIST");
# endif
+# ifdef EXIM_HAVE_ALPN
+builtin_macro_create(US"_HAVE_TLS_ALPN");
+# endif
}
#else
diff --git a/test/confs/1115 b/test/confs/1190
index c1d571821..c65bf5b0c 100644
--- a/test/confs/1115
+++ b/test/confs/1190
@@ -1,4 +1,4 @@
-# Exim test configuration 1115
+# Exim test configuration 1190
# ALPN
SERVER =
diff --git a/test/confs/2038 b/test/confs/2038
deleted file mode 120000
index 03a524df8..000000000
--- a/test/confs/2038
+++ /dev/null
@@ -1 +0,0 @@
-1115 \ No newline at end of file
diff --git a/test/confs/2090 b/test/confs/2090
new file mode 120000
index 000000000..e55dbc5cd
--- /dev/null
+++ b/test/confs/2090
@@ -0,0 +1 @@
+1190 \ No newline at end of file
diff --git a/test/confs/2138 b/test/confs/2138
deleted file mode 120000
index 03a524df8..000000000
--- a/test/confs/2138
+++ /dev/null
@@ -1 +0,0 @@
-1115 \ No newline at end of file
diff --git a/test/confs/2190 b/test/confs/2190
new file mode 120000
index 000000000..e55dbc5cd
--- /dev/null
+++ b/test/confs/2190
@@ -0,0 +1 @@
+1190 \ No newline at end of file
diff --git a/test/log/1115 b/test/log/1190
index af3f1df34..af3f1df34 100644
--- a/test/log/1115
+++ b/test/log/1190
diff --git a/test/log/2038 b/test/log/2090
index a93f4d3ed..a93f4d3ed 100644
--- a/test/log/2038
+++ b/test/log/2090
diff --git a/test/log/2138 b/test/log/2190
index bbc80a45a..bbc80a45a 100644
--- a/test/log/2138
+++ b/test/log/2190
diff --git a/test/scripts/1100-Basic-TLS/1115 b/test/scripts/1190-TLS-ALPN/1190
index d74caca52..d74caca52 100644
--- a/test/scripts/1100-Basic-TLS/1115
+++ b/test/scripts/1190-TLS-ALPN/1190
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/2090-GnuTLS-ALPN/2090
index 227af8475..227af8475 100644
--- a/test/scripts/2000-GnuTLS/2038
+++ b/test/scripts/2090-GnuTLS-ALPN/2090
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/2190-OpenSSL-ALPN/2190
index 7dadb3051..7dadb3051 100644
--- a/test/scripts/2100-OpenSSL/2138
+++ b/test/scripts/2190-OpenSSL-ALPN/2190
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