summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-bad.cmake
diff options
context:
space:
mode:
authorscivision <scivision@users.noreply.github.com>2023-02-10 02:53:02 (GMT)
committerBrad King <brad.king@kitware.com>2023-02-10 17:22:00 (GMT)
commit17b47da3d8988c5723fb6083e48ed94080442e1d (patch)
treeb4e22396e46dbd2b06446a1471eddf737f974b4f /Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-bad.cmake
parent9b7d086220928cd6106ee2d220ab26deef5ba2a8 (diff)
downloadCMake-17b47da3d8988c5723fb6083e48ed94080442e1d.zip
CMake-17b47da3d8988c5723fb6083e48ed94080442e1d.tar.gz
CMake-17b47da3d8988c5723fb6083e48ed94080442e1d.tar.bz2
Tests: Add test for file(DOWNLOAD) with TLS_VERIFY
Occasionally curl updates introduce errors in https verification. Add an explicit test for this capability, activated by an undocumented option that we can use in CI to specify a URL to test. Co-authored-by: Brad King <brad.king@kitware.com> Fixes: #24405 Issue: #24147 Issue: #24398
Diffstat (limited to 'Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-bad.cmake')
-rw-r--r--Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-bad.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-bad.cmake b/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-bad.cmake
new file mode 100644
index 0000000..333f990
--- /dev/null
+++ b/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-bad.cmake
@@ -0,0 +1,6 @@
+file(DOWNLOAD https://expired.badssl.com TLS_VERIFY 1 STATUS status LOG log)
+message(STATUS "${status}")
+list(GET status 0 code)
+if(NOT code MATCHES "^(35|60)$")
+ message("${log}")
+endif()