cmake/Help/variable/CMAKE_TLS_VERIFY.rst

25 lines
855 B
ReStructuredText
Raw Normal View History

2021-09-14 00:13:48 +02:00
CMAKE_TLS_VERIFY
----------------
Specify the default value for the :command:`file(DOWNLOAD)` and
:command:`file(UPLOAD)` commands' ``TLS_VERIFY`` options.
2024-07-09 14:46:46 +02:00
If this variable is not set, the commands check the
:envvar:`CMAKE_TLS_VERIFY` environment variable.
2024-11-11 15:18:55 +01:00
If neither is set, the default is *on*.
.. versionchanged:: 3.31
The default is on. Previously, the default was off.
Users may set the :envvar:`CMAKE_TLS_VERIFY` environment
variable to ``0`` to restore the old default.
2021-09-14 00:13:48 +02:00
2021-11-20 13:41:27 +01:00
This variable is also used by the :module:`ExternalProject` and
:module:`FetchContent` modules for internal calls to :command:`file(DOWNLOAD)`.
2021-09-14 00:13:48 +02:00
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.
.. code-block:: cmake
set(CMAKE_TLS_VERIFY TRUE)