summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-04-08 12:51:02 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-04-08 12:51:11 (GMT)
commite8295e532ba36096627306faaa5bd62591d9e626 (patch)
treecbdf2199128f718daa8a88450ecab7e88990a1bb
parentd5e44d7a38b9b592f69a53f5322f2ad159086907 (diff)
parent942776308140c2b2c8536fb6d846cd1ab04ce61f (diff)
downloadCMake-e8295e532ba36096627306faaa5bd62591d9e626.zip
CMake-e8295e532ba36096627306faaa5bd62591d9e626.tar.gz
CMake-e8295e532ba36096627306faaa5bd62591d9e626.tar.bz2
Merge topic 'file-upload-tls'
9427763081 file(UPLOAD): Add default ca_certs Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4579
-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;