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.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/testcurl/https/test_https_get_parallel.c b/src/testcurl/https/test_https_get_parallel.c
index f44dcf33..95a06319 100644
--- a/src/testcurl/https/test_https_get_parallel.c
+++ b/src/testcurl/https/test_https_get_parallel.c
@@ -62,8 +62,7 @@ https_transfer_thread_adapter (void *args)
62 62
63 /* time spread incoming requests */ 63 /* time spread incoming requests */
64 usleep ((useconds_t) 10.0 * ((double) rand ()) / ((double) RAND_MAX)); 64 usleep ((useconds_t) 10.0 * ((double) rand ()) / ((double) RAND_MAX));
65 ret = test_https_transfer (NULL, cargs->port, 65 ret = test_https_transfer (NULL, cargs->port);
66 cargs->cipher_suite, cargs->proto_version);
67 if (ret == 0) 66 if (ret == 0)
68 return NULL; 67 return NULL;
69 return &nonnull; 68 return &nonnull;
@@ -78,12 +77,11 @@ https_transfer_thread_adapter (void *args)
78 * TODO : make client_count a parameter - number of curl client threads to spawn 77 * TODO : make client_count a parameter - number of curl client threads to spawn
79 */ 78 */
80static int 79static int
81test_single_client (void *cls, int port, const char *cipher_suite, 80test_single_client (void *cls, int port)
82 int curl_proto_version)
83{ 81{
84 void *client_thread_ret; 82 void *client_thread_ret;
85 struct https_test_data client_args = 83 struct https_test_data client_args =
86 { NULL, port, cipher_suite, curl_proto_version }; 84 { NULL, port };
87 (void) cls; /* Unused. Silent compiler warning. */ 85 (void) cls; /* Unused. Silent compiler warning. */
88 86
89 client_thread_ret = https_transfer_thread_adapter (&client_args); 87 client_thread_ret = https_transfer_thread_adapter (&client_args);
@@ -101,15 +99,14 @@ test_single_client (void *cls, int port, const char *cipher_suite,
101 * TODO : make client_count a parameter - number of curl client threads to spawn 99 * TODO : make client_count a parameter - number of curl client threads to spawn
102 */ 100 */
103static int 101static int
104test_parallel_clients (void *cls, int port, const char *cipher_suite, 102test_parallel_clients (void *cls, int port)
105 int curl_proto_version)
106{ 103{
107 int i; 104 int i;
108 int client_count = (MHD_CPU_COUNT - 1); 105 int client_count = (MHD_CPU_COUNT - 1);
109 void *client_thread_ret; 106 void *client_thread_ret;
110 pthread_t client_arr[client_count]; 107 pthread_t client_arr[client_count];
111 struct https_test_data client_args = 108 struct https_test_data client_args =
112 { NULL, port, cipher_suite, curl_proto_version }; 109 { NULL, port };
113 (void) cls; /* Unused. Silent compiler warning. */ 110 (void) cls; /* Unused. Silent compiler warning. */
114 111
115 for (i = 0; i < client_count; ++i) 112 for (i = 0; i < client_count; ++i)
@@ -138,7 +135,6 @@ int
138main (int argc, char *const *argv) 135main (int argc, char *const *argv)
139{ 136{
140 unsigned int errorCount = 0; 137 unsigned int errorCount = 0;
141 const char *aes256_sha = "AES256-SHA";
142 int port; 138 int port;
143 unsigned int iseed; 139 unsigned int iseed;
144 (void) argc; /* Unused. Silent compiler warning. */ 140 (void) argc; /* Unused. Silent compiler warning. */
@@ -159,8 +155,6 @@ main (int argc, char *const *argv)
159 fprintf (stderr, "Curl does not support SSL. Cannot run the test.\n"); 155 fprintf (stderr, "Curl does not support SSL. Cannot run the test.\n");
160 return 77; 156 return 77;
161 } 157 }
162 if (curl_tls_is_nss ())
163 aes256_sha = "rsa_aes_256_sha";
164#ifdef EPOLL_SUPPORT 158#ifdef EPOLL_SUPPORT
165 errorCount += 159 errorCount +=
166 test_wrap ("single threaded daemon, single client, epoll", 160 test_wrap ("single threaded daemon, single client, epoll",
@@ -168,7 +162,7 @@ main (int argc, char *const *argv)
168 NULL, port, 162 NULL, port,
169 MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS 163 MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS
170 | MHD_USE_ERROR_LOG | MHD_USE_EPOLL, 164 | MHD_USE_ERROR_LOG | MHD_USE_EPOLL,
171 aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, 165 MHD_OPTION_HTTPS_MEM_KEY,
172 srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, 166 srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT,
173 srv_self_signed_cert_pem, MHD_OPTION_END); 167 srv_self_signed_cert_pem, MHD_OPTION_END);
174#endif 168#endif
@@ -177,7 +171,7 @@ main (int argc, char *const *argv)
177 NULL, port, 171 NULL, port,
178 MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS 172 MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS
179 | MHD_USE_ERROR_LOG, 173 | MHD_USE_ERROR_LOG,
180 aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, 174 MHD_OPTION_HTTPS_MEM_KEY,
181 srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, 175 srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT,
182 srv_self_signed_cert_pem, MHD_OPTION_END); 176 srv_self_signed_cert_pem, MHD_OPTION_END);
183#ifdef EPOLL_SUPPORT 177#ifdef EPOLL_SUPPORT
@@ -186,7 +180,7 @@ main (int argc, char *const *argv)
186 &test_parallel_clients, NULL, port, 180 &test_parallel_clients, NULL, port,
187 MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS 181 MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS
188 | MHD_USE_ERROR_LOG | MHD_USE_EPOLL, 182 | MHD_USE_ERROR_LOG | MHD_USE_EPOLL,
189 aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, 183 MHD_OPTION_HTTPS_MEM_KEY,
190 srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, 184 srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT,
191 srv_self_signed_cert_pem, MHD_OPTION_END); 185 srv_self_signed_cert_pem, MHD_OPTION_END);
192#endif 186#endif
@@ -195,7 +189,7 @@ main (int argc, char *const *argv)
195 &test_parallel_clients, NULL, port, 189 &test_parallel_clients, NULL, port,
196 MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS 190 MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS
197 | MHD_USE_ERROR_LOG, 191 | MHD_USE_ERROR_LOG,
198 aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, 192 MHD_OPTION_HTTPS_MEM_KEY,
199 srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, 193 srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT,
200 srv_self_signed_cert_pem, MHD_OPTION_END); 194 srv_self_signed_cert_pem, MHD_OPTION_END);
201 195