diff options
author | Brad King <brad.king@kitware.com> | 2024-03-29 15:50:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-03-30 13:22:04 (GMT) |
commit | 46faaf9667cff75008e91a5e379e7409c9b365c4 (patch) | |
tree | 121d5f37415757655b8d8c305913ec29426f1be1 /Source/cmFileCommand.cxx | |
parent | 8b0169fe2b807204d606eeabb701e8f410944647 (diff) | |
download | CMake-46faaf9667cff75008e91a5e379e7409c9b365c4.zip CMake-46faaf9667cff75008e91a5e379e7409c9b365c4.tar.gz CMake-46faaf9667cff75008e91a5e379e7409c9b365c4.tar.bz2 |
file(DOWNLOAD|UPLOAD): Add CMAKE_TLS_VERIFY environment variable
Issue: #23608
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 ac1d22b..0369051 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -2036,6 +2036,12 @@ bool HandleDownloadCommand(std::vector<std::string> const& args, tls_verify = v.IsOn(); } } + if (!tls_verify) { + if (cm::optional<std::string> v = + cmSystemTools::GetEnvVar("CMAKE_TLS_VERIFY")) { + tls_verify = cmIsOn(*v); + } + } if (!tls_version) { if (cmValue v = status.GetMakefile().GetDefinition("CMAKE_TLS_VERSION")) { @@ -2439,6 +2445,12 @@ bool HandleUploadCommand(std::vector<std::string> const& args, tls_verify = v.IsOn(); } } + if (!tls_verify) { + if (cm::optional<std::string> v = + cmSystemTools::GetEnvVar("CMAKE_TLS_VERIFY")) { + tls_verify = cmIsOn(*v); + } + } if (!tls_version) { if (cmValue v = status.GetMakefile().GetDefinition("CMAKE_TLS_VERSION")) { |