From: Mathew Benson Date: Wed, 16 Aug 2023 23:09:33 +0000 (+0300) Subject: cmake: add GnuTLS option X-Git-Tag: curl-8_3_0~150 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9ec764ee1fa4ef9c80d4dda54426e8d9153bc0f0;p=thirdparty%2Fcurl.git cmake: add GnuTLS option - Option to use GNUTLS was missing. Hence was not able to use GNUTLS with ngtcp2 for http3. Closes #11685 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index b09bfd527c..96a03a2206 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -405,6 +405,7 @@ endif() cmake_dependent_option(CURL_USE_MBEDTLS "Enable mbedTLS for SSL/TLS" OFF CURL_ENABLE_SSL OFF) cmake_dependent_option(CURL_USE_BEARSSL "Enable BearSSL for SSL/TLS" OFF CURL_ENABLE_SSL OFF) cmake_dependent_option(CURL_USE_WOLFSSL "enable wolfSSL for SSL/TLS" OFF CURL_ENABLE_SSL OFF) +cmake_dependent_option(CURL_USE_GNUTLS "Enable GNUTLS for SSL/TLS" OFF CURL_ENABLE_SSL OFF) set(openssl_default ON) if(WIN32 OR CURL_USE_SECTRANSP OR CURL_USE_SCHANNEL OR CURL_USE_MBEDTLS OR CURL_USE_WOLFSSL) @@ -511,6 +512,11 @@ if(CURL_USE_WOLFSSL) include_directories(${WolfSSL_INCLUDE_DIRS}) endif() +if(CURL_USE_GNUTLS) + set(SSL_ENABLED ON) + set(USE_GNUTLS ON) +endif() + # Keep ZLIB detection after TLS detection, # and before calling openssl_check_symbol_exists(). @@ -1444,7 +1450,7 @@ endmacro() # NTLM support requires crypto function adaptions from various SSL libs # TODO alternative SSL libs tests for SSP1, GNUTLS, NSS if(NOT (CURL_DISABLE_CRYPTO_AUTH OR CURL_DISABLE_NTLM) AND - (USE_OPENSSL OR USE_MBEDTLS OR USE_DARWINSSL OR USE_WIN32_CRYPTO)) + (USE_OPENSSL OR USE_MBEDTLS OR USE_DARWINSSL OR USE_WIN32_CRYPTO OR USE_GNUTLS)) set(use_curl_ntlm_core ON) endif() @@ -1544,6 +1550,8 @@ _add_if("Secure Transport" SSL_ENABLED AND USE_SECTRANSP) _add_if("mbedTLS" SSL_ENABLED AND USE_MBEDTLS) _add_if("BearSSL" SSL_ENABLED AND USE_BEARSSL) _add_if("wolfSSL" SSL_ENABLED AND USE_WOLFSSL) +_add_if("GnuTLS" SSL_ENABLED AND USE_GNUTLS) + if(_items) list(SORT _items) endif()