curl: Use Windows SSL/TLS native implementation

On Windows, when CMAKE_USE_OPENSSL is OFF, use the OS implementation.
This will allow the OS-configured CA list to be trusted automatically.
This commit is contained in:
Brad King 2014-12-12 13:29:54 -05:00
parent a829f09bdd
commit ba8c663219
2 changed files with 14 additions and 1 deletions

View File

@ -0,0 +1,9 @@
curl-winssl
-----------
* On Windows, commands supporting network communication, such as
:command:`file(DOWNLOAD)`, :command:`file(UPLOAD)`, and
:command:`ctest_submit`, now support SSL/TLS even when CMake
is not built against OpenSSL. The Windows native SSL/TLS
implementation is used by default. OS-configured certificate
authorities will be trusted automatically.

View File

@ -460,7 +460,11 @@ if(CMAKE_USE_OPENSSL)
add_definitions(-DCURL_CA_BUNDLE="${CURL_CA_BUNDLE}") add_definitions(-DCURL_CA_BUNDLE="${CURL_CA_BUNDLE}")
endif() endif()
endif(OPENSSL_FOUND) endif(OPENSSL_FOUND)
endif(CMAKE_USE_OPENSSL) elseif(WIN32)
# Use Windows SSL/TLS native implementation.
add_definitions(-DUSE_SCHANNEL)
set(USE_WINDOWS_SSPI 1)
endif()
#libSSH2 #libSSH2
option(CMAKE_USE_LIBSSH2 "Use libSSH2" ON) option(CMAKE_USE_LIBSSH2 "Use libSSH2" ON)