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
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
Most of the test uses `file://` URLs instead of hitting the network.
However, a case covering an invalid hostname does try to make a real
connection, expecting it to fail DNS resolution. Turn off that case
if we are asked not to hit the network during testing.
The RunCMake infrastructure is more well-suited to check the results of
each case. It can also report more precisely what went wrong when a
case fails.