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.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/testcurl/https/test_https_session_info.c b/src/testcurl/https/test_https_session_info.c
index e3b2b428..8d74feb2 100644
--- a/src/testcurl/https/test_https_session_info.c
+++ b/src/testcurl/https/test_https_session_info.c
@@ -35,7 +35,8 @@
35#include "tls_test_common.h" 35#include "tls_test_common.h"
36#include "tls_test_keys.h" 36#include "tls_test_keys.h"
37 37
38struct MHD_Daemon *d; 38#if LIBCURL_VERSION_NUM >= 0x072200
39static struct MHD_Daemon *d;
39 40
40/* 41/*
41 * HTTP access handler call back 42 * HTTP access handler call back
@@ -93,7 +94,6 @@ query_session_ahc (void *cls, struct MHD_Connection *connection,
93/** 94/**
94 * negotiate a secure connection with server & query negotiated security parameters 95 * negotiate a secure connection with server & query negotiated security parameters
95 */ 96 */
96#if LIBCURL_VERSION_NUM >= 0x072200
97static unsigned int 97static unsigned int
98test_query_session (void) 98test_query_session (void)
99{ 99{
@@ -183,12 +183,9 @@ test_query_session (void)
183} 183}
184 184
185 185
186#endif
187
188int 186int
189main (int argc, char *const *argv) 187main (int argc, char *const *argv)
190{ 188{
191#if LIBCURL_VERSION_NUM >= 0x072200
192 unsigned int errorCount = 0; 189 unsigned int errorCount = 0;
193 const char *ssl_version; 190 const char *ssl_version;
194 (void) argc; /* Unused. Silent compiler warning. */ 191 (void) argc; /* Unused. Silent compiler warning. */
@@ -219,9 +216,19 @@ main (int argc, char *const *argv)
219 print_test_result (errorCount, argv[0]); 216 print_test_result (errorCount, argv[0]);
220 curl_global_cleanup (); 217 curl_global_cleanup ();
221 return errorCount != 0 ? 1 : 0; 218 return errorCount != 0 ? 1 : 0;
219}
220
221
222#else /* LIBCURL_VERSION_NUM < 0x072200 */ 222#else /* LIBCURL_VERSION_NUM < 0x072200 */
223
224int
225main (int argc, char *const *argv)
226{
223 (void) argc; (void) argv; /* Unused. Silent compiler warning. */ 227 (void) argc; (void) argv; /* Unused. Silent compiler warning. */
224 (void) query_session_ahc; /* Mute compiler warning */ 228 fprintf (stderr, "libcurl version 7.34.0 or later is required.\n" \
229 "Cannot run the test.\n");
225 return 77; 230 return 77;
226#endif /* LIBCURL_VERSION_NUM < 0x072200 */
227} 231}
232
233
234#endif /* LIBCURL_VERSION_NUM < 0x072200 */