summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-09-20 20:55:26 (GMT)
committerBrad King <brad.king@kitware.com>2024-09-24 12:37:23 (GMT)
commit8e92ee34f6ba4058ca7dc793009f98f2096d8f38 (patch)
tree483205b52c47a02432b746a799ceac537d74952f /Tests/RunCMake
parentdcaea54898cccb9ac1f675a395ac1793d1abfcfc (diff)
downloadCMake-8e92ee34f6ba4058ca7dc793009f98f2096d8f38.zip
CMake-8e92ee34f6ba4058ca7dc793009f98f2096d8f38.tar.gz
CMake-8e92ee34f6ba4058ca7dc793009f98f2096d8f38.tar.bz2
file(DOWNLOAD/UPLOAD): Verify TLS server certificate by default
If the connection fails in a way that might be a certificate error, and verification was enabled by the new default, mention environment variable `CMAKE_TLS_VERIFY` in the diagnostic to help users that were relying on the old behavior turn off server certificate verification in their environment. Fixes: #23608
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-bad-stdout.txt2
-rw-r--r--Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-bad.cmake4
2 files changed, 3 insertions, 3 deletions
diff --git a/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-bad-stdout.txt b/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-bad-stdout.txt
index fbff3b9..d32292f 100644
--- a/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-bad-stdout.txt
+++ b/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-bad-stdout.txt
@@ -1,4 +1,4 @@
--- def-0: 0;"No error"
+-- def-1: (60;"SSL peer certificate or SSH remote key was not OK|35;"SSL connect error)\. If this is due to https certificate verification failure, one may set environment variable CMAKE_TLS_VERIFY=0 to suppress it\."
-- env-0: 0;"No error"
-- env-1: (60;"SSL peer certificate or SSH remote key was not OK"|35;"SSL connect error")
-- var-0: 0;"No error"
diff --git a/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-bad.cmake b/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-bad.cmake
index 7d50ece..44fcfae 100644
--- a/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-bad.cmake
+++ b/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-bad.cmake
@@ -7,10 +7,10 @@ function(download case)
endif()
endfunction()
-# The default is OFF.
+# The default is ON.
unset(ENV{CMAKE_TLS_VERIFY})
unset(CMAKE_TLS_VERIFY)
-download(def-0)
+download(def-1)
# The environment variable overrides the default.
set(ENV{CMAKE_TLS_VERIFY} 0)