summaryrefslogtreecommitdiffstats
path: root/Source/cmFileCommand.cxx
diff options
context:
space:
mode:
authorHarry Mallon <hjmallon@gmail.com>2020-04-07 16:42:37 (GMT)
committerBrad King <brad.king@kitware.com>2020-04-07 16:58:04 (GMT)
commit942776308140c2b2c8536fb6d846cd1ab04ce61f (patch)
tree65ed5b15fc05c10966465723f3dfe8b857d79995 /Source/cmFileCommand.cxx
parentb8b804e2ed8dca3c6d116a6e8a1cb66cbd6ad241 (diff)
downloadCMake-942776308140c2b2c8536fb6d846cd1ab04ce61f.zip
CMake-942776308140c2b2c8536fb6d846cd1ab04ce61f.tar.gz
CMake-942776308140c2b2c8536fb6d846cd1ab04ce61f.tar.bz2
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
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r--Source/cmFileCommand.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 4603b13..204e99f 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -2055,6 +2055,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;