file(DOWNLOAD|UPLOAD): Add CMAKE_TLS_VERSION environment variable

Issue: #25701
This commit is contained in:
Brad King
2024-02-26 11:36:33 -05:00
parent fb9a6cf909
commit 434fe8a34b
7 changed files with 41 additions and 3 deletions
+12
View File
@@ -2030,6 +2030,12 @@ bool HandleDownloadCommand(std::vector<std::string> const& args,
tls_version = *v;
}
}
if (!tls_version) {
if (cm::optional<std::string> v =
cmSystemTools::GetEnvVar("CMAKE_TLS_VERSION")) {
tls_version = std::move(v);
}
}
// Can't calculate hash if we don't save the file.
// TODO Incrementally calculate hash in the write callback as the file is
@@ -2421,6 +2427,12 @@ bool HandleUploadCommand(std::vector<std::string> const& args,
tls_version = *v;
}
}
if (!tls_version) {
if (cm::optional<std::string> v =
cmSystemTools::GetEnvVar("CMAKE_TLS_VERSION")) {
tls_version = std::move(v);
}
}
// Open file for reading:
//