From ed97fe06acb27f66b6b8eff1f9669166e0bb9f50 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 6 Mar 2024 11:43:40 +0000 Subject: [PATCH] cmake: fix `CURL_WINDOWS_SSPI=ON` with Schannel disabled Prior to this change `CURL_WINDOWS_SSPI` was accidentally forced `OFF` when building without the Schannel TLS backend. This in turn may have caused Kerberos, SPNEGO and SSPI features disappearing even with `CURL_WINDOWS_SSPI=ON` set. This patch fixes it by using the `CURL_USE_SCHANNEL` setting as a default for `CURL_WINDOWS_SSPI`, but allowing a manual override. Also update the option text to better tell its purpose. Thanks-to: Andreas Loew Reviewed-by: Daniel Stenberg Ref: #13056 Closes #13061 --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 083f2c5e41..40c0f77651 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -393,8 +393,7 @@ if(APPLE) endif() if(WIN32) cmake_dependent_option(CURL_USE_SCHANNEL "Enable Windows native SSL/TLS" OFF CURL_ENABLE_SSL OFF) - cmake_dependent_option(CURL_WINDOWS_SSPI "Use windows libraries to allow NTLM authentication without OpenSSL" ON - CURL_USE_SCHANNEL OFF) + option(CURL_WINDOWS_SSPI "Enable SSPI on Windows" ${CURL_USE_SCHANNEL}) 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)