test_https_sni: limit to libcrul with certain TLS backends.

NSS can't be used with SSL_VERIFYPEER disabled, while SSL_VERIFYHOST is
enabled, other backends may have some problems as well.
This commit is contained in:
Evgeny Grin (Karlson2k) committed 2022-04-21 13:40:10 +03:00
1 parent fc649c7bf3
commit a3ce7049bd
2 files changed
+31 -1

No files matched your search

+11 -1
View File
@@ -257,6 +257,7 @@ main (int argc, char *const *argv)
struct MHD_Daemon *d;
int port;
(void) argc; /* Unused. Silent compiler warning. */
const char *tls_backend;
if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT))
port = 0;
@@ -271,12 +272,21 @@ main (int argc, char *const *argv)
#endif /* MHD_HTTPS_REQUIRE_GRYPT */
if (! testsuite_curl_global_init ())
return 99;
if (NULL == curl_version_info (CURLVERSION_NOW)->ssl_version)
tls_backend = curl_version_info (CURLVERSION_NOW)->ssl_version;
if (NULL == tls_backend)
{
fprintf (stderr, "Curl does not support SSL. Cannot run the test.\n");
curl_global_cleanup ();
return 77;
}
if (! curl_tls_is_gnutls () && ! curl_tls_is_openssl ())
{
fprintf (stderr, "This test is reliable only with libcurl with GnuTLS or "
"OpenSSL backends.\nSkipping the test as libcurl has '%s' "
"backend.\n", tls_backend);
curl_global_cleanup ();
return 77;
}
load_keys ("mhdhost1", ABS_SRCDIR "/mhdhost1.crt",
ABS_SRCDIR "/mhdhost1.key");