]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: ssl: guard SSL_CTX_add_server_custom_ext with special macro
authorIlya Shipitsin <chipitsine@gmail.com>
Sat, 6 Feb 2021 13:59:22 +0000 (18:59 +0500)
committerWilliam Lallemand <wlallemand@haproxy.org>
Sun, 7 Feb 2021 23:11:43 +0000 (00:11 +0100)
special guard macros HAVE_SSL_CTX_ADD_SERVER_CUSTOM_EXT was defined earlier
exactly for guarding SSL_CTX_add_server_custom_ext, let us use it wherever
appropriate

src/ssl_sock.c

index f2c8a667cdf62cd20d8a2a179fc64b1e51a2a05d..3105785032f553e3f7f41c9777f45c6d0e52610a 100644 (file)
@@ -6922,7 +6922,7 @@ static struct action_kw_list http_req_actions = {ILH, {
 
 INITCALL1(STG_REGISTER, http_req_keywords_register, &http_req_actions);
 
-#if (HA_OPENSSL_VERSION_NUMBER >= 0x1000200fL && !defined OPENSSL_NO_TLSEXT && !defined OPENSSL_IS_BORINGSSL)
+#ifdef HAVE_SSL_CTX_ADD_SERVER_CUSTOM_EXT
 
 static void ssl_sock_sctl_free_func(void *parent, void *ptr, CRYPTO_EX_DATA *ad, int idx, long argl, void *argp)
 {
@@ -7020,7 +7020,7 @@ static void __ssl_sock_init(void)
 #if defined(USE_THREAD) && (HA_OPENSSL_VERSION_NUMBER < 0x10100000L)
        ssl_locking_init();
 #endif
-#if (HA_OPENSSL_VERSION_NUMBER >= 0x1000200fL && !defined OPENSSL_NO_TLSEXT && !defined OPENSSL_IS_BORINGSSL)
+#ifdef HAVE_SSL_CTX_ADD_SERVER_CUSTOM_EXT
        sctl_ex_index = SSL_CTX_get_ex_new_index(0, NULL, NULL, NULL, ssl_sock_sctl_free_func);
 #endif