summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Source/cmFileCommand.cxx7
1 files changed, 7 insertions, 0 deletions
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<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;