From 942776308140c2b2c8536fb6d846cd1ab04ce61f 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(+) (limited to 'Source') diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 4603b13b3d..204e99fc19 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -2055,6 +2055,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 v1.2.1