if(CURL_USE_SCHANNEL)
set(_ssl_enabled ON)
set(USE_SCHANNEL ON) # Windows native SSL/TLS support
- set(USE_WINDOWS_SSPI ON) # CURL_USE_SCHANNEL implies CURL_WINDOWS_SSPI
+ set(USE_WINDOWS_SSPI ON) # CURL_USE_SCHANNEL requires CURL_WINDOWS_SSPI
if(CURL_DEFAULT_SSL_BACKEND AND CURL_DEFAULT_SSL_BACKEND STREQUAL "schannel")
set(_valid_default_ssl_backend TRUE)
(HAVE_GSSAPI OR USE_WINDOWS_SSPI))
curl_add_if("Kerberos" NOT CURL_DISABLE_KERBEROS_AUTH AND
(HAVE_GSSAPI OR USE_WINDOWS_SSPI))
-curl_add_if("NTLM" NOT (CURL_DISABLE_NTLM) AND
+curl_add_if("NTLM" NOT CURL_DISABLE_NTLM AND
(_use_curl_ntlm_core OR USE_WINDOWS_SSPI))
curl_add_if("TLS-SRP" USE_TLS_SRP)
curl_add_if("HTTP2" USE_NGHTTP2)
/* ALPN requires version 8.1 of the Windows SDK, which was
shipped with Visual Studio 2013, aka _MSC_VER 1800:
-
- https://technet.microsoft.com/en-us/library/hh831771%28v=ws.11%29.aspx
+ https://technet.microsoft.com/en-us/library/hh831771%28v=ws.11%29.aspx
+ Or mingw-w64 9.0 or upper.
*/
-#if defined(_MSC_VER) && (_MSC_VER >= 1800) && !defined(_USING_V110_SDK71_)
+#if (defined(__MINGW32__) && __MINGW64_VERSION_MAJOR >= 9) || \
+ (defined(_MSC_VER) && (_MSC_VER >= 1800) && !defined(_USING_V110_SDK71_))
# define HAS_ALPN_SCHANNEL
#endif
"connect to some servers due to lack of SNI, algorithms, etc.");
}
+ {
#ifdef HAS_ALPN_SCHANNEL
- /* ALPN is only supported on Windows 8.1 / Server 2012 R2 and above.
- Also it does not seem to be supported for WINE, see curl bug #983. */
- backend->use_alpn = connssl->alpn &&
- !GetProcAddress(GetModuleHandle(TEXT("ntdll")),
- "wine_get_version") &&
- curlx_verify_windows_version(6, 3, 0, PLATFORM_WINNT,
- VERSION_GREATER_THAN_EQUAL);
+ bool wine;
+#ifdef CURL_WINDOWS_UWP
+ /* GetModuleHandle() not available for UWP.
+ Assume no WINE because WINE has no UWP support. */
+ wine = FALSE;
#else
- backend->use_alpn = FALSE;
+ wine = !!GetProcAddress(GetModuleHandle(TEXT("ntdll")),
+ "wine_get_version");
+#endif
+ /* ALPN is only supported on Windows 8.1 / Server 2012 R2 and above.
+ Also it does not seem to be supported for WINE, see curl bug #983. */
+ backend->use_alpn = connssl->alpn && !wine &&
+ curlx_verify_windows_version(6, 3, 0, PLATFORM_WINNT,
+ VERSION_GREATER_THAN_EQUAL);
+#else
+ backend->use_alpn = FALSE;
#endif
+ }
#ifdef _WIN32_WCE
#ifdef HAS_MANUAL_VERIFY_API