[exim-cvs] ALPN: feature macro

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Exim Git Commits Mailing List
Fecha:  
A: exim-cvs
Asunto: [exim-cvs] ALPN: feature macro
Gitweb: https://git.exim.org/exim.git/commitdiff/d083e3f2af9baf1910a69c1cc4a06a26be99d40c
Commit:     d083e3f2af9baf1910a69c1cc4a06a26be99d40c
Parent:     b634f8eaf52aae84c311d7e306f38f3dc07ff1b0
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Sun Jul 18 15:51:16 2021 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Sun Jul 18 15:54:05 2021 +0100


    ALPN: feature macro
---
 doc/doc-docbook/spec.xfpt                                  | 3 ++-
 src/src/tls-gnu.c                                          | 3 +++
 src/src/tls-openssl.c                                      | 3 +++
 test/confs/{1115 => 1190}                                  | 2 +-
 test/confs/2038                                            | 1 -
 test/confs/2090                                            | 1 +
 test/confs/2138                                            | 1 -
 test/confs/2190                                            | 1 +
 test/log/{1115 => 1190}                                    | 0
 test/log/{2038 => 2090}                                    | 0
 test/log/{2138 => 2190}                                    | 0
 test/scripts/{1100-Basic-TLS/1115 => 1190-TLS-ALPN/1190}   | 0
 test/scripts/1190-TLS-ALPN/REQUIRES                        | 1 +
 test/scripts/{2000-GnuTLS/2038 => 2090-GnuTLS-ALPN/2090}   | 0
 test/scripts/2090-GnuTLS-ALPN/REQUIRES                     | 3 +++
 test/scripts/{2100-OpenSSL/2138 => 2190-OpenSSL-ALPN/2190} | 0
 test/scripts/2190-OpenSSL-ALPN/REQUIRES                    | 3 +++
 17 files changed, 18 insertions(+), 4 deletions(-)


diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt
index 2687f60..fef3dfc 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 f63a837..b9f8d2a 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 d9ec82d..5bf6a60 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
similarity index 96%
rename from test/confs/1115
rename to test/confs/1190
index c1d5718..c65bf5b 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 03a524d..0000000
--- 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 0000000..e55dbc5
--- /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 03a524d..0000000
--- 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 0000000..e55dbc5
--- /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
similarity index 100%
rename from test/log/1115
rename to test/log/1190
diff --git a/test/log/2038 b/test/log/2090
similarity index 100%
rename from test/log/2038
rename to test/log/2090
diff --git a/test/log/2138 b/test/log/2190
similarity index 100%
rename from test/log/2138
rename to test/log/2190
diff --git a/test/scripts/1100-Basic-TLS/1115 b/test/scripts/1190-TLS-ALPN/1190
similarity index 100%
rename from test/scripts/1100-Basic-TLS/1115
rename to 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 0000000..44d5cc0
--- /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
similarity index 100%
rename from test/scripts/2000-GnuTLS/2038
rename to 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 0000000..878f1a3
--- /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
similarity index 100%
rename from test/scripts/2100-OpenSSL/2138
rename to 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 0000000..d97fd97
--- /dev/null
+++ b/test/scripts/2190-OpenSSL-ALPN/REQUIRES
@@ -0,0 +1,3 @@
+support OpenSSL
+running IPv4
+feature _HAVE_TLS_ALPN