summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorHarry Mallon <hjmallon@gmail.com>2020-04-07 17:42:37 +0100
committerBrad King <brad.king@kitware.com>2020-04-15 08:55:09 -0400
commitdbfece1004e7be7d0dc22bdec118c8d7e84bffa5 (patch)
tree5f4c71357feb871414f50b6d290e394d64377e77 /Source
parentbd580b7d568493a795a855c0710ba4ad88532485 (diff)
downloadcmake-dbfece1004e7be7d0dc22bdec118c8d7e84bffa5.tar.gz
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')
-rw-r--r--Source/cmFileCommand.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 79110ab401..e36abdce8b 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;