summaryrefslogtreecommitdiffstats
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-15 12:55:09 (GMT)
commitdbfece1004e7be7d0dc22bdec118c8d7e84bffa5 (patch)
tree5f4c71357feb871414f50b6d290e394d64377e77
parentbd580b7d568493a795a855c0710ba4ad88532485 (diff)
downloadCMake-dbfece1004e7be7d0dc22bdec118c8d7e84bffa5.zip
CMake-dbfece1004e7be7d0dc22bdec118c8d7e84bffa5.tar.gz
CMake-dbfece1004e7be7d0dc22bdec118c8d7e84bffa5.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
-rw-r--r--Source/cmFileCommand.cxx7
1 files changed, 7 insertions, 0 deletions
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<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;