aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-10-05 12:58:53 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-10-10 11:54:29 +0300
commit8d00c4f7785900821627bb2e287552d6e6383469 (patch)
treeeaf998781eeafbd9ed732d5055ef93e86467c354
parent860010b6684fb31e5231078ea64021e16c617234 (diff)
downloadlibmicrohttpd-8d00c4f7785900821627bb2e287552d6e6383469.tar.gz
libmicrohttpd-8d00c4f7785900821627bb2e287552d6e6383469.zip
testcurl/https: enable verbose libcurl on debug builds
-rw-r--r--src/testcurl/https/test_empty_response.c3
-rw-r--r--src/testcurl/https/test_https_get.c3
-rw-r--r--src/testcurl/https/test_https_get_iovec.c3
-rw-r--r--src/testcurl/https/test_https_get_select.c3
-rw-r--r--src/testcurl/https/test_https_session_info.c2
-rw-r--r--src/testcurl/https/test_https_sni.c2
-rw-r--r--src/testcurl/https/tls_test_common.c6
-rw-r--r--src/testcurl/https/tls_test_common.h4
8 files changed, 17 insertions, 9 deletions
diff --git a/src/testcurl/https/test_empty_response.c b/src/testcurl/https/test_empty_response.c
index 92dbaec7..932a51bc 100644
--- a/src/testcurl/https/test_empty_response.c
+++ b/src/testcurl/https/test_empty_response.c
@@ -106,6 +106,9 @@ testInternalSelectGet (void)
106 } 106 }
107 107
108 c = curl_easy_init (); 108 c = curl_easy_init ();
109#ifdef _DEBUG
110 curl_easy_setopt (c, CURLOPT_VERBOSE, 1L);
111#endif
109 curl_easy_setopt (c, CURLOPT_URL, "https://127.0.0.1/hello_world"); 112 curl_easy_setopt (c, CURLOPT_URL, "https://127.0.0.1/hello_world");
110 curl_easy_setopt (c, CURLOPT_PORT, (long) port); 113 curl_easy_setopt (c, CURLOPT_PORT, (long) port);
111 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 114 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
diff --git a/src/testcurl/https/test_https_get.c b/src/testcurl/https/test_https_get.c
index 7eebfd4c..a0cdb82f 100644
--- a/src/testcurl/https/test_https_get.c
+++ b/src/testcurl/https/test_https_get.c
@@ -193,6 +193,9 @@ testEmptyGet (unsigned int poll_flag)
193 global_port = dinfo->port; 193 global_port = dinfo->port;
194 } 194 }
195 c = curl_easy_init (); 195 c = curl_easy_init ();
196#ifdef _DEBUG
197 curl_easy_setopt (c, CURLOPT_VERBOSE, 1L);
198#endif
196 curl_easy_setopt (c, CURLOPT_URL, "https://127.0.0.1/"); 199 curl_easy_setopt (c, CURLOPT_URL, "https://127.0.0.1/");
197 curl_easy_setopt (c, CURLOPT_PORT, (long) global_port); 200 curl_easy_setopt (c, CURLOPT_PORT, (long) global_port);
198 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 201 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
diff --git a/src/testcurl/https/test_https_get_iovec.c b/src/testcurl/https/test_https_get_iovec.c
index c5ff7cb4..90ed5a07 100644
--- a/src/testcurl/https/test_https_get_iovec.c
+++ b/src/testcurl/https/test_https_get_iovec.c
@@ -351,6 +351,9 @@ testEmptyGet (unsigned int poll_flag)
351 global_port = dinfo->port; 351 global_port = dinfo->port;
352 } 352 }
353 c = curl_easy_init (); 353 c = curl_easy_init ();
354#ifdef _DEBUG
355 curl_easy_setopt (c, CURLOPT_VERBOSE, 1L);
356#endif
354 curl_easy_setopt (c, CURLOPT_URL, "https://127.0.0.1/"); 357 curl_easy_setopt (c, CURLOPT_URL, "https://127.0.0.1/");
355 curl_easy_setopt (c, CURLOPT_PORT, (long) global_port); 358 curl_easy_setopt (c, CURLOPT_PORT, (long) global_port);
356 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 359 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
diff --git a/src/testcurl/https/test_https_get_select.c b/src/testcurl/https/test_https_get_select.c
index 13145390..9ab7e892 100644
--- a/src/testcurl/https/test_https_get_select.c
+++ b/src/testcurl/https/test_https_get_select.c
@@ -122,6 +122,9 @@ testExternalGet (unsigned int flags)
122 } 122 }
123 123
124 c = curl_easy_init (); 124 c = curl_easy_init ();
125#ifdef _DEBUG
126 curl_easy_setopt (c, CURLOPT_VERBOSE, 1L);
127#endif
125 curl_easy_setopt (c, CURLOPT_URL, "https://127.0.0.1/hello_world"); 128 curl_easy_setopt (c, CURLOPT_URL, "https://127.0.0.1/hello_world");
126 curl_easy_setopt (c, CURLOPT_PORT, (long) port); 129 curl_easy_setopt (c, CURLOPT_PORT, (long) port);
127 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 130 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
diff --git a/src/testcurl/https/test_https_session_info.c b/src/testcurl/https/test_https_session_info.c
index 8d74feb2..c1bb31ef 100644
--- a/src/testcurl/https/test_https_session_info.c
+++ b/src/testcurl/https/test_https_session_info.c
@@ -145,7 +145,7 @@ test_query_session (void)
145 sizeof (url), 145 sizeof (url),
146 port); 146 port);
147 c = curl_easy_init (); 147 c = curl_easy_init ();
148#if DEBUG_HTTPS_TEST 148#ifdef _DEBUG
149 curl_easy_setopt (c, CURLOPT_VERBOSE, 1L); 149 curl_easy_setopt (c, CURLOPT_VERBOSE, 1L);
150#endif 150#endif
151 curl_easy_setopt (c, CURLOPT_URL, url); 151 curl_easy_setopt (c, CURLOPT_URL, url);
diff --git a/src/testcurl/https/test_https_sni.c b/src/testcurl/https/test_https_sni.c
index 0bde8adb..5059998e 100644
--- a/src/testcurl/https/test_https_sni.c
+++ b/src/testcurl/https/test_https_sni.c
@@ -199,7 +199,7 @@ do_get (const char *url, uint16_t port)
199 cbc.pos = 0; 199 cbc.pos = 0;
200 200
201 c = curl_easy_init (); 201 c = curl_easy_init ();
202#if DEBUG_HTTPS_TEST 202#ifdef _DEBUG
203 curl_easy_setopt (c, CURLOPT_VERBOSE, 1L); 203 curl_easy_setopt (c, CURLOPT_VERBOSE, 1L);
204#endif 204#endif
205 curl_easy_setopt (c, CURLOPT_URL, url); 205 curl_easy_setopt (c, CURLOPT_URL, url);
diff --git a/src/testcurl/https/tls_test_common.c b/src/testcurl/https/tls_test_common.c
index 51d20cce..b44ded1e 100644
--- a/src/testcurl/https/tls_test_common.c
+++ b/src/testcurl/https/tls_test_common.c
@@ -60,7 +60,7 @@ test_daemon_get (void *cls,
60 port); 60 port);
61 61
62 c = curl_easy_init (); 62 c = curl_easy_init ();
63#if DEBUG_HTTPS_TEST 63#ifdef _DEBUG
64 curl_easy_setopt (c, CURLOPT_VERBOSE, 1L); 64 curl_easy_setopt (c, CURLOPT_VERBOSE, 1L);
65#endif 65#endif
66 if ((CURLE_OK != (e = curl_easy_setopt (c, CURLOPT_URL, url))) || 66 if ((CURLE_OK != (e = curl_easy_setopt (c, CURLOPT_URL, url))) ||
@@ -247,8 +247,8 @@ send_curl_req (char *url,
247 CURLcode errornum; 247 CURLcode errornum;
248 CURLcode e; 248 CURLcode e;
249 c = curl_easy_init (); 249 c = curl_easy_init ();
250#if DEBUG_HTTPS_TEST 250#ifdef _DEBUG
251 curl_easy_setopt (c, CURLOPT_VERBOSE, CURL_VERBOS_LEVEL); 251 curl_easy_setopt (c, CURLOPT_VERBOSE, 1L);
252#endif 252#endif
253 if ((CURLE_OK != (e = curl_easy_setopt (c, CURLOPT_URL, url))) || 253 if ((CURLE_OK != (e = curl_easy_setopt (c, CURLOPT_URL, url))) ||
254 (CURLE_OK != (e = curl_easy_setopt (c, CURLOPT_HTTP_VERSION, 254 (CURLE_OK != (e = curl_easy_setopt (c, CURLOPT_HTTP_VERSION,
diff --git a/src/testcurl/https/tls_test_common.h b/src/testcurl/https/tls_test_common.h
index e6a61485..5192b774 100644
--- a/src/testcurl/https/tls_test_common.h
+++ b/src/testcurl/https/tls_test_common.h
@@ -28,10 +28,6 @@
28#include <limits.h> 28#include <limits.h>
29#include <gnutls/gnutls.h> 29#include <gnutls/gnutls.h>
30 30
31/* this enables verbos CURL version checking */
32#define DEBUG_HTTPS_TEST 0
33#define CURL_VERBOS_LEVEL 0
34
35#define test_data "Hello World\n" 31#define test_data "Hello World\n"
36#define ca_cert_file_name SRCDIR "/test-ca.crt" 32#define ca_cert_file_name SRCDIR "/test-ca.crt"
37 33