From 105686fae0a3f3a009af6cff0e34b87ab099ad9c Mon Sep 17 00:00:00 2001
From: David Weisgerber <weisgerber@ms-gmbh.de>
Date: Fri, 26 Jan 2018 10:19:24 +0100
Subject: [PATCH] cmake: Enable SSPI with openssl library

CMakeLists.txt was changed so it is possible to build libcurl against openssl
and at the same time enable SSPI.
---
 CMakeLists.txt | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 490cc19ef..1a832b5cd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -305,8 +305,6 @@ if(APPLE)
 endif()
 if(WIN32)
   option(CMAKE_USE_WINSSL "enable Windows native SSL/TLS" OFF)
-  cmake_dependent_option(CURL_WINDOWS_SSPI "Use windows libraries to allow NTLM authentication without openssl" ON
-    CMAKE_USE_WINSSL OFF)
 endif()
 option(CMAKE_USE_MBEDTLS "Enable mbedTLS for SSL/TLS" OFF)
 
@@ -335,6 +333,7 @@ endif()
 if(CURL_WINDOWS_SSPI)
   set(USE_WINDOWS_SSPI ON)
   set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -DSECURITY_WIN32")
+  list(APPEND CURL_LIBS "crypt32")
 endif()
 
 if(CMAKE_USE_DARWINSSL)
-- 
2.13.0.windows.1

