aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/https/test_https_sni.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testcurl/https/test_https_sni.c')
-rw-r--r--src/testcurl/https/test_https_sni.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/testcurl/https/test_https_sni.c b/src/testcurl/https/test_https_sni.c
index cc7d1f43..4ffe1d8f 100644
--- a/src/testcurl/https/test_https_sni.c
+++ b/src/testcurl/https/test_https_sni.c
@@ -257,6 +257,7 @@ main (int argc, char *const *argv)
257 struct MHD_Daemon *d; 257 struct MHD_Daemon *d;
258 int port; 258 int port;
259 (void) argc; /* Unused. Silent compiler warning. */ 259 (void) argc; /* Unused. Silent compiler warning. */
260 const char *tls_backend;
260 261
261 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) 262 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT))
262 port = 0; 263 port = 0;
@@ -271,12 +272,21 @@ main (int argc, char *const *argv)
271#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 272#endif /* MHD_HTTPS_REQUIRE_GRYPT */
272 if (! testsuite_curl_global_init ()) 273 if (! testsuite_curl_global_init ())
273 return 99; 274 return 99;
274 if (NULL == curl_version_info (CURLVERSION_NOW)->ssl_version) 275 tls_backend = curl_version_info (CURLVERSION_NOW)->ssl_version;
276 if (NULL == tls_backend)
275 { 277 {
276 fprintf (stderr, "Curl does not support SSL. Cannot run the test.\n"); 278 fprintf (stderr, "Curl does not support SSL. Cannot run the test.\n");
277 curl_global_cleanup (); 279 curl_global_cleanup ();
278 return 77; 280 return 77;
279 } 281 }
282 if (! curl_tls_is_gnutls () && ! curl_tls_is_openssl ())
283 {
284 fprintf (stderr, "This test is reliable only with libcurl with GnuTLS or "
285 "OpenSSL backends.\nSkipping the test as libcurl has '%s' "
286 "backend.\n", tls_backend);
287 curl_global_cleanup ();
288 return 77;
289 }
280 290
281 load_keys ("mhdhost1", ABS_SRCDIR "/mhdhost1.crt", 291 load_keys ("mhdhost1", ABS_SRCDIR "/mhdhost1.crt",
282 ABS_SRCDIR "/mhdhost1.key"); 292 ABS_SRCDIR "/mhdhost1.key");