diff options
author | Brad King <brad.king@kitware.com> | 2024-02-26 16:36:02 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-02-28 13:40:27 (GMT) |
commit | fb9a6cf909381de8eabe88913349312cce411714 (patch) | |
tree | 27b5fd0ba8a45dffc047a44b726f45f3fab08f27 /Source/cmFileCommand.cxx | |
parent | 8e6776b9f3f17aa234e38ead7047f64c539cda1c (diff) | |
download | CMake-fb9a6cf909381de8eabe88913349312cce411714.zip CMake-fb9a6cf909381de8eabe88913349312cce411714.tar.gz CMake-fb9a6cf909381de8eabe88913349312cce411714.tar.bz2 |
file(DOWNLOAD|UPLOAD): Add CMAKE_TLS_VERSION variable
Issue: #25701
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r-- | Source/cmFileCommand.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index dcdb1ae..d193375 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -2025,6 +2025,12 @@ bool HandleDownloadCommand(std::vector<std::string> const& args, ++i; } + if (!tls_version) { + if (cmValue v = status.GetMakefile().GetDefinition("CMAKE_TLS_VERSION")) { + tls_version = *v; + } + } + // Can't calculate hash if we don't save the file. // TODO Incrementally calculate hash in the write callback as the file is // being downloaded so this check can be relaxed. @@ -2410,6 +2416,12 @@ bool HandleUploadCommand(std::vector<std::string> const& args, ++i; } + if (!tls_version) { + if (cmValue v = status.GetMakefile().GetDefinition("CMAKE_TLS_VERSION")) { + tls_version = *v; + } + } + // Open file for reading: // FILE* fin = cmsys::SystemTools::Fopen(filename, "rb"); |