]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: fix `CURL_WINDOWS_SSPI=ON` with Schannel disabled
authorViktor Szakats <commit@vsz.me>
Wed, 6 Mar 2024 11:43:40 +0000 (11:43 +0000)
committerViktor Szakats <commit@vsz.me>
Thu, 7 Mar 2024 00:23:20 +0000 (00:23 +0000)
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

index 083f2c5e4137506f1aad953459f1584502bcf64c..40c0f776510131ce556a5e52198fde6c2d895c2c 100644 (file)
@@ -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)