aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/https/test_https_get_parallel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testcurl/https/test_https_get_parallel.c')
-rw-r--r--src/testcurl/https/test_https_get_parallel.c31
1 files changed, 24 insertions, 7 deletions
diff --git a/src/testcurl/https/test_https_get_parallel.c b/src/testcurl/https/test_https_get_parallel.c
index 4a9dd9dc..32f34ec0 100644
--- a/src/testcurl/https/test_https_get_parallel.c
+++ b/src/testcurl/https/test_https_get_parallel.c
@@ -19,7 +19,7 @@
19*/ 19*/
20 20
21/** 21/**
22 * @file tls_thread_mode_test.c 22 * @file test_https_get_parallel.c
23 * @brief Testcase for libmicrohttpd HTTPS GET operations 23 * @brief Testcase for libmicrohttpd HTTPS GET operations
24 * @author Sagie Amir 24 * @author Sagie Amir
25 * @author Christian Grothoff 25 * @author Christian Grothoff
@@ -38,6 +38,7 @@ extern const char srv_self_signed_cert_pem[];
38 38
39int curl_check_version (const char *req_version, ...); 39int curl_check_version (const char *req_version, ...);
40 40
41
41/** 42/**
42 * used when spawning multiple threads executing curl server requests 43 * used when spawning multiple threads executing curl server requests
43 * 44 *
@@ -58,6 +59,7 @@ https_transfer_thread_adapter (void *args)
58 return &nonnull; 59 return &nonnull;
59} 60}
60 61
62
61/** 63/**
62 * Test non-parallel requests. 64 * Test non-parallel requests.
63 * 65 *
@@ -79,6 +81,7 @@ test_single_client (void *cls, const char *cipher_suite,
79 return 0; 81 return 0;
80} 82}
81 83
84
82/** 85/**
83 * Test parallel request handling. 86 * Test parallel request handling.
84 * 87 *
@@ -124,6 +127,7 @@ int
124main (int argc, char *const *argv) 127main (int argc, char *const *argv)
125{ 128{
126 unsigned int errorCount = 0; 129 unsigned int errorCount = 0;
130 const char *aes256_sha = "AES256-SHA";
127 131
128 /* initialize random seed used by curl clients */ 132 /* initialize random seed used by curl clients */
129 unsigned int iseed = (unsigned int) time (NULL); 133 unsigned int iseed = (unsigned int) time (NULL);
@@ -135,12 +139,17 @@ main (int argc, char *const *argv)
135 return -1; 139 return -1;
136 } 140 }
137 141
138 char *aes256_sha = "AES256-SHA";
139 if (curl_uses_nss_ssl() == 0) 142 if (curl_uses_nss_ssl() == 0)
140 { 143 aes256_sha = "rsa_aes_256_sha";
141 aes256_sha = "rsa_aes_256_sha"; 144#if LINUX
142 } 145 errorCount +=
143 146 test_wrap ("single threaded daemon, single client, epoll", &test_single_client,
147 NULL,
148 MHD_USE_SELECT_INTERNALLY | MHD_USE_SSL | MHD_USE_DEBUG | MHD_USE_EPOLL_LINUX_ONLY,
149 aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY,
150 srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT,
151 srv_self_signed_cert_pem, MHD_OPTION_END);
152#endif
144 errorCount += 153 errorCount +=
145 test_wrap ("single threaded daemon, single client", &test_single_client, 154 test_wrap ("single threaded daemon, single client", &test_single_client,
146 NULL, 155 NULL,
@@ -148,7 +157,15 @@ main (int argc, char *const *argv)
148 aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, 157 aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY,
149 srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, 158 srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT,
150 srv_self_signed_cert_pem, MHD_OPTION_END); 159 srv_self_signed_cert_pem, MHD_OPTION_END);
151 160#if LINUX
161 errorCount +=
162 test_wrap ("single threaded daemon, parallel clients, epoll",
163 &test_parallel_clients, NULL,
164 MHD_USE_SELECT_INTERNALLY | MHD_USE_SSL | MHD_USE_DEBUG | MHD_USE_EPOLL_LINUX_ONLY,
165 aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY,
166 srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT,
167 srv_self_signed_cert_pem, MHD_OPTION_END);
168#endif
152 errorCount += 169 errorCount +=
153 test_wrap ("single threaded daemon, parallel clients", 170 test_wrap ("single threaded daemon, parallel clients",
154 &test_parallel_clients, NULL, 171 &test_parallel_clients, NULL,