file(UPLOAD): Add default ca_certs

Default ca_certs were not added when using `UPLOAD` with built-in
(non-system) cURL.  Previously we only did this for `DOWNLOAD`.

Fixes: #20551
This commit is contained in:
Harry Mallon
2020-04-07 17:42:37 +01:00
committed by Brad King
parent bd580b7d56
commit dbfece1004

View File

@@ -2051,6 +2051,13 @@ bool HandleUploadCommand(std::vector<std::string> const& args,
cmFileCommandCurlDebugCallback);
check_curl_result(res, "UPLOAD cannot set debug function: ");
// make sure default CAInfo is set
std::string const& cainfo_err = cmCurlSetCAInfo(curl, nullptr);
if (!cainfo_err.empty()) {
status.SetError(cainfo_err);
return false;
}
cmFileCommandVectorOfChar chunkResponse;
cmFileCommandVectorOfChar chunkDebug;