Use Schannel instead of mbedtls on Windows to avoid bundling CA certs

Also added a test that fails on the previous commit
This commit is contained in:
Jusonex 2017-03-08 22:48:40 +01:00
parent d80e174774
commit b2ec8b1b9a
2 changed files with 19 additions and 1 deletions

View File

@ -2,7 +2,7 @@ project "curl-lib"
language "C"
kind "StaticLib"
includedirs { "include", "lib", "../mbedtls/include/" }
defines { "BUILDING_LIBCURL", "CURL_STATICLIB", "HTTP_ONLY", "USE_MBEDTLS" }
defines { "BUILDING_LIBCURL", "CURL_STATICLIB", "HTTP_ONLY" }
warnings "off"
if not _OPTIONS["no-zlib"] then
@ -15,6 +15,12 @@ project "curl-lib"
"**.h",
"**.c"
}
filter { "system:windows" }
defines { "USE_SCHANNEL", "USE_WINDOWS_SSPI" }
filter { "system:not windows" }
defines { "USE_MBEDTLS" }
filter { "system:linux" }
defines { "CURL_HIDDEN_SYMBOLS" }

View File

@ -38,6 +38,18 @@
end
end
function suite.https_get_verify_peer()
local result, err = http.get("https://httpbin.org/user-agent")
if result then
p.out(result)
test.capture(
'{\n "user-agent": "Premake/' .. _PREMAKE_VERSION .. '"\n}'
)
else
test.fail(err);
end
end
function suite.http_responsecode()
local result, err, responseCode = http.get("http://httpbin.org/status/418")
test.isequal(responseCode, 418)