CMAKE_TLS_VERIFY

Specify the default value for the file(DOWNLOAD) and file(UPLOAD) commands' TLS_VERIFY options. If not set, the default is off.

This setting is also used by the ExternalProject module for internal calls to file(DOWNLOAD).

TLS verification can help provide confidence that one is connecting to the desired server. When downloading known content, one should also use file hashes to verify it.

set(CMAKE_TLS_VERIFY TRUE)

© 2000–2021 Kitware, Inc. and Contributors
Licensed under the BSD 3-clause License.
https://cmake.org/cmake/help/v3.21/variable/CMAKE_TLS_VERIFY.html