aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/https/test_https_session_info.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testcurl/https/test_https_session_info.c')
-rw-r--r--src/testcurl/https/test_https_session_info.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/testcurl/https/test_https_session_info.c b/src/testcurl/https/test_https_session_info.c
index 97be81af..12d70f7b 100644
--- a/src/testcurl/https/test_https_session_info.c
+++ b/src/testcurl/https/test_https_session_info.c
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of libmicrohttpd 2 This file is part of libmicrohttpd
3 Copyright (C) 2007 Christian Grothoff 3 Copyright (C) 2007, 2016 Christian Grothoff
4 4
5 libmicrohttpd is free software; you can redistribute it and/or modify 5 libmicrohttpd is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published 6 it under the terms of the GNU General Public License as published
@@ -168,6 +168,7 @@ int
168main (int argc, char *const *argv) 168main (int argc, char *const *argv)
169{ 169{
170 unsigned int errorCount = 0; 170 unsigned int errorCount = 0;
171 const char *ssl_version;
171 172
172 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); 173 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
173#ifdef GCRYCTL_INITIALIZATION_FINISHED 174#ifdef GCRYCTL_INITIALIZATION_FINISHED
@@ -178,6 +179,18 @@ main (int argc, char *const *argv)
178 fprintf (stderr, "Error (code: %u)\n", errorCount); 179 fprintf (stderr, "Error (code: %u)\n", errorCount);
179 return -1; 180 return -1;
180 } 181 }
182
183 ssl_version = curl_version_info (CURLVERSION_NOW)->ssl_version;
184 if (NULL == ssl_version)
185 {
186 fprintf (stderr, "Curl does not support SSL. Cannot run the test.\n");
187 return 77;
188 }
189 if (0 != strncmp (ssl_version, "GnuTLS", 6))
190 {
191 fprintf (stderr, "This test can be run only with libcurl-gnutls.\n");
192 return 77;
193 }
181#if LIBCURL_VERSION_NUM >= 0x072200 194#if LIBCURL_VERSION_NUM >= 0x072200
182 errorCount += test_query_session (); 195 errorCount += test_query_session ();
183#endif 196#endif