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:
parent
d80e174774
commit
b2ec8b1b9a
@ -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" }
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user