From dbfece1004e7be7d0dc22bdec118c8d7e84bffa5 Mon Sep 17 00:00:00 2001 From: Harry Mallon Date: Tue, 7 Apr 2020 17:42:37 +0100 Subject: 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 --- Source/cmFileCommand.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 79110ab..e36abdc 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -2051,6 +2051,13 @@ bool HandleUploadCommand(std::vector 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; -- cgit v0.12