diff options
Diffstat (limited to 'src/testcurl/https/test_https_get_parallel_threads.c')
-rw-r--r-- | src/testcurl/https/test_https_get_parallel_threads.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/src/testcurl/https/test_https_get_parallel_threads.c b/src/testcurl/https/test_https_get_parallel_threads.c index f963fc8b..cc1add12 100644 --- a/src/testcurl/https/test_https_get_parallel_threads.c +++ b/src/testcurl/https/test_https_get_parallel_threads.c | |||
@@ -63,8 +63,7 @@ https_transfer_thread_adapter (void *args) | |||
63 | 63 | ||
64 | /* time spread incoming requests */ | 64 | /* time spread incoming requests */ |
65 | usleep ((useconds_t) 10.0 * ((double) rand ()) / ((double) RAND_MAX)); | 65 | usleep ((useconds_t) 10.0 * ((double) rand ()) / ((double) RAND_MAX)); |
66 | ret = test_https_transfer (cargs->cls, cargs->port, | 66 | ret = test_https_transfer (cargs->cls, cargs->port); |
67 | cargs->cipher_suite, cargs->proto_version); | ||
68 | if (ret == 0) | 67 | if (ret == 0) |
69 | return NULL; | 68 | return NULL; |
70 | return &nonnull; | 69 | return &nonnull; |
@@ -79,12 +78,11 @@ https_transfer_thread_adapter (void *args) | |||
79 | * TODO : make client_count a parameter - number of curl client threads to spawn | 78 | * TODO : make client_count a parameter - number of curl client threads to spawn |
80 | */ | 79 | */ |
81 | static int | 80 | static int |
82 | test_single_client (void *cls, int port, const char *cipher_suite, | 81 | test_single_client (void *cls, int port) |
83 | int curl_proto_version) | ||
84 | { | 82 | { |
85 | void *client_thread_ret; | 83 | void *client_thread_ret; |
86 | struct https_test_data client_args = | 84 | struct https_test_data client_args = |
87 | { NULL, port, cipher_suite, curl_proto_version }; | 85 | { NULL, port}; |
88 | (void) cls; /* Unused. Silent compiler warning. */ | 86 | (void) cls; /* Unused. Silent compiler warning. */ |
89 | 87 | ||
90 | client_thread_ret = https_transfer_thread_adapter (&client_args); | 88 | client_thread_ret = https_transfer_thread_adapter (&client_args); |
@@ -102,15 +100,14 @@ test_single_client (void *cls, int port, const char *cipher_suite, | |||
102 | * TODO : make client_count a parameter - number of curl client threads to spawn | 100 | * TODO : make client_count a parameter - number of curl client threads to spawn |
103 | */ | 101 | */ |
104 | static int | 102 | static int |
105 | test_parallel_clients (void *cls, int port, const char *cipher_suite, | 103 | test_parallel_clients (void *cls, int port) |
106 | int curl_proto_version) | ||
107 | { | 104 | { |
108 | int i; | 105 | int i; |
109 | int client_count = (MHD_CPU_COUNT - 1); | 106 | int client_count = (MHD_CPU_COUNT - 1); |
110 | void *client_thread_ret; | 107 | void *client_thread_ret; |
111 | pthread_t client_arr[client_count]; | 108 | pthread_t client_arr[client_count]; |
112 | struct https_test_data client_args = | 109 | struct https_test_data client_args = |
113 | { NULL, port, cipher_suite, curl_proto_version }; | 110 | { NULL, port }; |
114 | (void) cls; /* Unused. Silent compiler warning. */ | 111 | (void) cls; /* Unused. Silent compiler warning. */ |
115 | 112 | ||
116 | for (i = 0; i < client_count; ++i) | 113 | for (i = 0; i < client_count; ++i) |
@@ -143,7 +140,6 @@ main (int argc, char *const *argv) | |||
143 | const char *ssl_version; | 140 | const char *ssl_version; |
144 | int port; | 141 | int port; |
145 | unsigned int iseed; | 142 | unsigned int iseed; |
146 | char *aes256_sha = "AES256-SHA"; | ||
147 | (void) argc; /* Unused. Silent compiler warning. */ | 143 | (void) argc; /* Unused. Silent compiler warning. */ |
148 | 144 | ||
149 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) | 145 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) |
@@ -176,17 +172,12 @@ main (int argc, char *const *argv) | |||
176 | return 77; | 172 | return 77; |
177 | } | 173 | } |
178 | 174 | ||
179 | if (curl_tls_is_nss ()) | ||
180 | { | ||
181 | aes256_sha = "rsa_aes_256_sha"; | ||
182 | } | ||
183 | |||
184 | errorCount += | 175 | errorCount += |
185 | test_wrap ("multi threaded daemon, single client", &test_single_client, | 176 | test_wrap ("multi threaded daemon, single client", &test_single_client, |
186 | NULL, port, | 177 | NULL, port, |
187 | MHD_USE_TLS | MHD_USE_ERROR_LOG | MHD_USE_THREAD_PER_CONNECTION | 178 | MHD_USE_TLS | MHD_USE_ERROR_LOG | MHD_USE_THREAD_PER_CONNECTION |
188 | | MHD_USE_INTERNAL_POLLING_THREAD, | 179 | | MHD_USE_INTERNAL_POLLING_THREAD, |
189 | aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, | 180 | MHD_OPTION_HTTPS_MEM_KEY, |
190 | srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, | 181 | srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, |
191 | srv_self_signed_cert_pem, MHD_OPTION_END); | 182 | srv_self_signed_cert_pem, MHD_OPTION_END); |
192 | 183 | ||
@@ -195,7 +186,7 @@ main (int argc, char *const *argv) | |||
195 | &test_parallel_clients, NULL, port, | 186 | &test_parallel_clients, NULL, port, |
196 | MHD_USE_TLS | MHD_USE_ERROR_LOG | MHD_USE_THREAD_PER_CONNECTION | 187 | MHD_USE_TLS | MHD_USE_ERROR_LOG | MHD_USE_THREAD_PER_CONNECTION |
197 | | MHD_USE_INTERNAL_POLLING_THREAD, | 188 | | MHD_USE_INTERNAL_POLLING_THREAD, |
198 | aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, | 189 | MHD_OPTION_HTTPS_MEM_KEY, |
199 | srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, | 190 | srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, |
200 | srv_self_signed_cert_pem, MHD_OPTION_END); | 191 | srv_self_signed_cert_pem, MHD_OPTION_END); |
201 | 192 | ||