Draft: CMAKE_TLS_VERIFY default on
as per #23608 enable TLS by default.
NOTE: needs a policy added
I use this CMakeLists.txt to test:
cmake_minimum_required(VERSION 3.19...3.24)
project(badSSL LANGUAGES NONE)
include(FetchContent)
include(ExternalProject)
# set(CMAKE_TLS_VERIFY false) # no error
# set(CMAKE_TLS_VERIFY "") # error
# set(CMAKE_TLS_VERIFY) # error (implicit unset(CMAKE_TLS_VERIFY))
# set(CMAKE_TLS_VERIFY true) # error
set(url https://expired.badssl.com/)
file(DOWNLOAD ${url} STATUS stat)
list(GET stat 0 retcode)
list(GET stat 1 msg)
message(STATUS "${url}
${CMAKE_TLS_VERIFY}
${retcode}
${msg}"
)
FetchContent_Declare(bad_Fetch
URL ${url}
)
# comment out FetchContent_Populate and cmake --build to see ExternalProject error
FetchContent_Populate(bad_Fetch)
ExternalProject_Add(bad_ExtProj
URL ${url}
)
Edited by scivision