CMake/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-good.cmake
scivision 17b47da3d8 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
2023-02-10 12:22:00 -05:00

7 lines
158 B
CMake

file(DOWNLOAD ${url} TLS_VERIFY 1 STATUS status LOG log)
message(STATUS "${status}")
list(GET status 0 code)
if(NOT code EQUAL 0)
message("${log}")
endif()