diff options
Diffstat (limited to 'src/testcurl/https')
-rw-r--r-- | src/testcurl/https/test_empty_response.c | 6 | ||||
-rw-r--r-- | src/testcurl/https/test_https_get.c | 8 | ||||
-rw-r--r-- | src/testcurl/https/test_https_get_iovec.c | 7 | ||||
-rw-r--r-- | src/testcurl/https/test_https_get_parallel.c | 11 | ||||
-rw-r--r-- | src/testcurl/https/test_https_get_parallel_threads.c | 10 | ||||
-rw-r--r-- | src/testcurl/https/test_https_get_select.c | 5 | ||||
-rw-r--r-- | src/testcurl/https/test_https_multi_daemon.c | 8 | ||||
-rw-r--r-- | src/testcurl/https/test_https_session_info.c | 7 | ||||
-rw-r--r-- | src/testcurl/https/test_tls_authentication.c | 8 | ||||
-rw-r--r-- | src/testcurl/https/test_tls_extensions.c | 2 | ||||
-rw-r--r-- | src/testcurl/https/test_tls_options.c | 10 | ||||
-rw-r--r-- | src/testcurl/https/tls_test_common.c | 10 |
12 files changed, 21 insertions, 71 deletions
diff --git a/src/testcurl/https/test_empty_response.c b/src/testcurl/https/test_empty_response.c index 07388b76..c1e58245 100644 --- a/src/testcurl/https/test_empty_response.c +++ b/src/testcurl/https/test_empty_response.c | |||
@@ -75,7 +75,6 @@ testInternalSelectGet (void) | |||
75 | time_t start; | 75 | time_t start; |
76 | struct timeval tv; | 76 | struct timeval tv; |
77 | uint16_t port; | 77 | uint16_t port; |
78 | const char *aes256_sha = "AES256-SHA"; | ||
79 | 78 | ||
80 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) | 79 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) |
81 | port = 0; | 80 | port = 0; |
@@ -105,10 +104,6 @@ testInternalSelectGet (void) | |||
105 | } | 104 | } |
106 | port = dinfo->port; | 105 | port = dinfo->port; |
107 | } | 106 | } |
108 | if (curl_tls_is_nss ()) | ||
109 | { | ||
110 | aes256_sha = "rsa_aes_256_sha"; | ||
111 | } | ||
112 | 107 | ||
113 | c = curl_easy_init (); | 108 | c = curl_easy_init (); |
114 | curl_easy_setopt (c, CURLOPT_URL, "https://127.0.0.1/hello_world"); | 109 | curl_easy_setopt (c, CURLOPT_URL, "https://127.0.0.1/hello_world"); |
@@ -117,7 +112,6 @@ testInternalSelectGet (void) | |||
117 | curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); | 112 | curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); |
118 | /* TLS options */ | 113 | /* TLS options */ |
119 | curl_easy_setopt (c, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1); | 114 | curl_easy_setopt (c, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1); |
120 | curl_easy_setopt (c, CURLOPT_SSL_CIPHER_LIST, aes256_sha); | ||
121 | curl_easy_setopt (c, CURLOPT_SSL_VERIFYPEER, 0L); | 115 | curl_easy_setopt (c, CURLOPT_SSL_VERIFYPEER, 0L); |
122 | curl_easy_setopt (c, CURLOPT_SSL_VERIFYHOST, 0L); | 116 | curl_easy_setopt (c, CURLOPT_SSL_VERIFYHOST, 0L); |
123 | curl_easy_setopt (c, CURLOPT_FAILONERROR, 1L); | 117 | curl_easy_setopt (c, CURLOPT_FAILONERROR, 1L); |
diff --git a/src/testcurl/https/test_https_get.c b/src/testcurl/https/test_https_get.c index 7c917d3b..f7569f43 100644 --- a/src/testcurl/https/test_https_get.c +++ b/src/testcurl/https/test_https_get.c | |||
@@ -232,7 +232,6 @@ int | |||
232 | main (int argc, char *const *argv) | 232 | main (int argc, char *const *argv) |
233 | { | 233 | { |
234 | unsigned int errorCount = 0; | 234 | unsigned int errorCount = 0; |
235 | const char *aes256_sha_tlsv1 = "AES256-SHA"; | ||
236 | (void) argc; (void) argv; /* Unused. Silent compiler warning. */ | 235 | (void) argc; (void) argv; /* Unused. Silent compiler warning. */ |
237 | 236 | ||
238 | #ifdef MHD_HTTPS_REQUIRE_GCRYPT | 237 | #ifdef MHD_HTTPS_REQUIRE_GCRYPT |
@@ -249,13 +248,8 @@ main (int argc, char *const *argv) | |||
249 | curl_global_cleanup (); | 248 | curl_global_cleanup (); |
250 | return 77; | 249 | return 77; |
251 | } | 250 | } |
252 | |||
253 | if (curl_tls_is_nss ()) | ||
254 | { | ||
255 | aes256_sha_tlsv1 = "rsa_aes_256_sha"; | ||
256 | } | ||
257 | errorCount += | 251 | errorCount += |
258 | test_secure_get (NULL, aes256_sha_tlsv1, CURL_SSLVERSION_TLSv1); | 252 | test_secure_get (NULL, NULL, CURL_SSLVERSION_TLSv1); |
259 | errorCount += testEmptyGet (0); | 253 | errorCount += testEmptyGet (0); |
260 | curl_global_cleanup (); | 254 | curl_global_cleanup (); |
261 | 255 | ||
diff --git a/src/testcurl/https/test_https_get_iovec.c b/src/testcurl/https/test_https_get_iovec.c index 39da52f3..7b99ff68 100644 --- a/src/testcurl/https/test_https_get_iovec.c +++ b/src/testcurl/https/test_https_get_iovec.c | |||
@@ -390,7 +390,6 @@ int | |||
390 | main (int argc, char *const *argv) | 390 | main (int argc, char *const *argv) |
391 | { | 391 | { |
392 | unsigned int errorCount = 0; | 392 | unsigned int errorCount = 0; |
393 | const char *aes256_sha_tlsv1 = "AES256-SHA"; | ||
394 | (void) argc; (void) argv; /* Unused. Silent compiler warning. */ | 393 | (void) argc; (void) argv; /* Unused. Silent compiler warning. */ |
395 | 394 | ||
396 | #ifdef MHD_HTTPS_REQUIRE_GCRYPT | 395 | #ifdef MHD_HTTPS_REQUIRE_GCRYPT |
@@ -408,12 +407,8 @@ main (int argc, char *const *argv) | |||
408 | return 77; | 407 | return 77; |
409 | } | 408 | } |
410 | 409 | ||
411 | if (curl_tls_is_nss ()) | ||
412 | { | ||
413 | aes256_sha_tlsv1 = "rsa_aes_256_sha"; | ||
414 | } | ||
415 | errorCount += | 410 | errorCount += |
416 | test_secure_get (NULL, aes256_sha_tlsv1, CURL_SSLVERSION_TLSv1); | 411 | test_secure_get (NULL, NULL, CURL_SSLVERSION_TLSv1); |
417 | errorCount += testEmptyGet (0); | 412 | errorCount += testEmptyGet (0); |
418 | curl_global_cleanup (); | 413 | curl_global_cleanup (); |
419 | 414 | ||
diff --git a/src/testcurl/https/test_https_get_parallel.c b/src/testcurl/https/test_https_get_parallel.c index 3fe65637..55725e3f 100644 --- a/src/testcurl/https/test_https_get_parallel.c +++ b/src/testcurl/https/test_https_get_parallel.c | |||
@@ -134,7 +134,6 @@ int | |||
134 | main (int argc, char *const *argv) | 134 | main (int argc, char *const *argv) |
135 | { | 135 | { |
136 | unsigned int errorCount = 0; | 136 | unsigned int errorCount = 0; |
137 | const char *aes256_sha = "AES256-SHA"; | ||
138 | uint16_t port; | 137 | uint16_t port; |
139 | unsigned int iseed; | 138 | unsigned int iseed; |
140 | (void) argc; /* Unused. Silent compiler warning. */ | 139 | (void) argc; /* Unused. Silent compiler warning. */ |
@@ -155,8 +154,6 @@ main (int argc, char *const *argv) | |||
155 | fprintf (stderr, "Curl does not support SSL. Cannot run the test.\n"); | 154 | fprintf (stderr, "Curl does not support SSL. Cannot run the test.\n"); |
156 | return 77; | 155 | return 77; |
157 | } | 156 | } |
158 | if (curl_tls_is_nss ()) | ||
159 | aes256_sha = "rsa_aes_256_sha"; | ||
160 | #ifdef EPOLL_SUPPORT | 157 | #ifdef EPOLL_SUPPORT |
161 | errorCount += | 158 | errorCount += |
162 | test_wrap ("single threaded daemon, single client, epoll", | 159 | test_wrap ("single threaded daemon, single client, epoll", |
@@ -164,7 +161,7 @@ main (int argc, char *const *argv) | |||
164 | NULL, port, | 161 | NULL, port, |
165 | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS | 162 | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS |
166 | | MHD_USE_ERROR_LOG | MHD_USE_EPOLL, | 163 | | MHD_USE_ERROR_LOG | MHD_USE_EPOLL, |
167 | aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, | 164 | NULL, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, |
168 | srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, | 165 | srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, |
169 | srv_self_signed_cert_pem, MHD_OPTION_END); | 166 | srv_self_signed_cert_pem, MHD_OPTION_END); |
170 | #endif | 167 | #endif |
@@ -173,7 +170,7 @@ main (int argc, char *const *argv) | |||
173 | NULL, port, | 170 | NULL, port, |
174 | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS | 171 | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS |
175 | | MHD_USE_ERROR_LOG, | 172 | | MHD_USE_ERROR_LOG, |
176 | aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, | 173 | NULL, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, |
177 | srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, | 174 | srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, |
178 | srv_self_signed_cert_pem, MHD_OPTION_END); | 175 | srv_self_signed_cert_pem, MHD_OPTION_END); |
179 | #ifdef EPOLL_SUPPORT | 176 | #ifdef EPOLL_SUPPORT |
@@ -182,7 +179,7 @@ main (int argc, char *const *argv) | |||
182 | &test_parallel_clients, NULL, port, | 179 | &test_parallel_clients, NULL, port, |
183 | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS | 180 | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS |
184 | | MHD_USE_ERROR_LOG | MHD_USE_EPOLL, | 181 | | MHD_USE_ERROR_LOG | MHD_USE_EPOLL, |
185 | aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, | 182 | NULL, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, |
186 | srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, | 183 | srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, |
187 | srv_self_signed_cert_pem, MHD_OPTION_END); | 184 | srv_self_signed_cert_pem, MHD_OPTION_END); |
188 | #endif | 185 | #endif |
@@ -191,7 +188,7 @@ main (int argc, char *const *argv) | |||
191 | &test_parallel_clients, NULL, port, | 188 | &test_parallel_clients, NULL, port, |
192 | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS | 189 | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS |
193 | | MHD_USE_ERROR_LOG, | 190 | | MHD_USE_ERROR_LOG, |
194 | aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, | 191 | NULL, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, |
195 | srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, | 192 | srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, |
196 | srv_self_signed_cert_pem, MHD_OPTION_END); | 193 | srv_self_signed_cert_pem, MHD_OPTION_END); |
197 | 194 | ||
diff --git a/src/testcurl/https/test_https_get_parallel_threads.c b/src/testcurl/https/test_https_get_parallel_threads.c index ae63b9fd..afbd793d 100644 --- a/src/testcurl/https/test_https_get_parallel_threads.c +++ b/src/testcurl/https/test_https_get_parallel_threads.c | |||
@@ -139,7 +139,6 @@ main (int argc, char *const *argv) | |||
139 | const char *ssl_version; | 139 | const char *ssl_version; |
140 | uint16_t port; | 140 | uint16_t port; |
141 | unsigned int iseed; | 141 | unsigned int iseed; |
142 | const char *aes256_sha = "AES256-SHA"; | ||
143 | (void) argc; /* Unused. Silent compiler warning. */ | 142 | (void) argc; /* Unused. Silent compiler warning. */ |
144 | 143 | ||
145 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) | 144 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) |
@@ -172,17 +171,12 @@ main (int argc, char *const *argv) | |||
172 | return 77; | 171 | return 77; |
173 | } | 172 | } |
174 | 173 | ||
175 | if (curl_tls_is_nss ()) | ||
176 | { | ||
177 | aes256_sha = "rsa_aes_256_sha"; | ||
178 | } | ||
179 | |||
180 | errorCount += | 174 | errorCount += |
181 | test_wrap ("multi threaded daemon, single client", &test_single_client, | 175 | test_wrap ("multi threaded daemon, single client", &test_single_client, |
182 | NULL, port, | 176 | NULL, port, |
183 | MHD_USE_TLS | MHD_USE_ERROR_LOG | MHD_USE_THREAD_PER_CONNECTION | 177 | MHD_USE_TLS | MHD_USE_ERROR_LOG | MHD_USE_THREAD_PER_CONNECTION |
184 | | MHD_USE_INTERNAL_POLLING_THREAD, | 178 | | MHD_USE_INTERNAL_POLLING_THREAD, |
185 | aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, | 179 | NULL, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, |
186 | srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, | 180 | srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, |
187 | srv_self_signed_cert_pem, MHD_OPTION_END); | 181 | srv_self_signed_cert_pem, MHD_OPTION_END); |
188 | 182 | ||
@@ -191,7 +185,7 @@ main (int argc, char *const *argv) | |||
191 | &test_parallel_clients, NULL, port, | 185 | &test_parallel_clients, NULL, port, |
192 | MHD_USE_TLS | MHD_USE_ERROR_LOG | MHD_USE_THREAD_PER_CONNECTION | 186 | MHD_USE_TLS | MHD_USE_ERROR_LOG | MHD_USE_THREAD_PER_CONNECTION |
193 | | MHD_USE_INTERNAL_POLLING_THREAD, | 187 | | MHD_USE_INTERNAL_POLLING_THREAD, |
194 | aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, | 188 | NULL, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, |
195 | srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, | 189 | srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, |
196 | srv_self_signed_cert_pem, MHD_OPTION_END); | 190 | srv_self_signed_cert_pem, MHD_OPTION_END); |
197 | 191 | ||
diff --git a/src/testcurl/https/test_https_get_select.c b/src/testcurl/https/test_https_get_select.c index 4de66fe6..7149caf7 100644 --- a/src/testcurl/https/test_https_get_select.c +++ b/src/testcurl/https/test_https_get_select.c | |||
@@ -92,7 +92,6 @@ testExternalGet (unsigned int flags) | |||
92 | struct CURLMsg *msg; | 92 | struct CURLMsg *msg; |
93 | time_t start; | 93 | time_t start; |
94 | struct timeval tv; | 94 | struct timeval tv; |
95 | const char *aes256_sha = "AES256-SHA"; | ||
96 | uint16_t port; | 95 | uint16_t port; |
97 | 96 | ||
98 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) | 97 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) |
@@ -122,9 +121,6 @@ testExternalGet (unsigned int flags) | |||
122 | port = dinfo->port; | 121 | port = dinfo->port; |
123 | } | 122 | } |
124 | 123 | ||
125 | if (curl_tls_is_nss ()) | ||
126 | aes256_sha = "rsa_aes_256_sha"; | ||
127 | |||
128 | c = curl_easy_init (); | 124 | c = curl_easy_init (); |
129 | curl_easy_setopt (c, CURLOPT_URL, "https://127.0.0.1/hello_world"); | 125 | curl_easy_setopt (c, CURLOPT_URL, "https://127.0.0.1/hello_world"); |
130 | curl_easy_setopt (c, CURLOPT_PORT, (long) port); | 126 | curl_easy_setopt (c, CURLOPT_PORT, (long) port); |
@@ -132,7 +128,6 @@ testExternalGet (unsigned int flags) | |||
132 | curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); | 128 | curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); |
133 | /* TLS options */ | 129 | /* TLS options */ |
134 | curl_easy_setopt (c, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1); | 130 | curl_easy_setopt (c, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1); |
135 | curl_easy_setopt (c, CURLOPT_SSL_CIPHER_LIST, aes256_sha); | ||
136 | curl_easy_setopt (c, CURLOPT_SSL_VERIFYPEER, 0L); | 131 | curl_easy_setopt (c, CURLOPT_SSL_VERIFYPEER, 0L); |
137 | curl_easy_setopt (c, CURLOPT_SSL_VERIFYHOST, 0L); | 132 | curl_easy_setopt (c, CURLOPT_SSL_VERIFYHOST, 0L); |
138 | curl_easy_setopt (c, CURLOPT_FAILONERROR, 1L); | 133 | curl_easy_setopt (c, CURLOPT_FAILONERROR, 1L); |
diff --git a/src/testcurl/https/test_https_multi_daemon.c b/src/testcurl/https/test_https_multi_daemon.c index fdc8279b..be7f65a2 100644 --- a/src/testcurl/https/test_https_multi_daemon.c +++ b/src/testcurl/https/test_https_multi_daemon.c | |||
@@ -131,7 +131,6 @@ int | |||
131 | main (int argc, char *const *argv) | 131 | main (int argc, char *const *argv) |
132 | { | 132 | { |
133 | unsigned int errorCount = 0; | 133 | unsigned int errorCount = 0; |
134 | const char *aes256_sha = "AES256-SHA"; | ||
135 | (void) argc; (void) argv; /* Unused. Silent compiler warning. */ | 134 | (void) argc; (void) argv; /* Unused. Silent compiler warning. */ |
136 | 135 | ||
137 | #ifdef MHD_HTTPS_REQUIRE_GCRYPT | 136 | #ifdef MHD_HTTPS_REQUIRE_GCRYPT |
@@ -149,13 +148,8 @@ main (int argc, char *const *argv) | |||
149 | return 77; | 148 | return 77; |
150 | } | 149 | } |
151 | 150 | ||
152 | if (curl_tls_is_nss ()) | ||
153 | { | ||
154 | aes256_sha = "rsa_aes_256_sha"; | ||
155 | } | ||
156 | |||
157 | errorCount += | 151 | errorCount += |
158 | test_concurent_daemon_pair (NULL, aes256_sha, CURL_SSLVERSION_TLSv1); | 152 | test_concurent_daemon_pair (NULL, NULL, CURL_SSLVERSION_TLSv1); |
159 | 153 | ||
160 | print_test_result (errorCount, "concurent_daemon_pair"); | 154 | print_test_result (errorCount, "concurent_daemon_pair"); |
161 | 155 | ||
diff --git a/src/testcurl/https/test_https_session_info.c b/src/testcurl/https/test_https_session_info.c index 3070c5f7..e3b2b428 100644 --- a/src/testcurl/https/test_https_session_info.c +++ b/src/testcurl/https/test_https_session_info.c | |||
@@ -102,7 +102,6 @@ test_query_session (void) | |||
102 | CURLcode errornum; | 102 | CURLcode errornum; |
103 | char url[256]; | 103 | char url[256]; |
104 | uint16_t port; | 104 | uint16_t port; |
105 | const char *aes256_sha = "AES256-SHA"; | ||
106 | 105 | ||
107 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) | 106 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) |
108 | port = 0; | 107 | port = 0; |
@@ -142,11 +141,6 @@ test_query_session (void) | |||
142 | port = dinfo->port; | 141 | port = dinfo->port; |
143 | } | 142 | } |
144 | 143 | ||
145 | if (curl_tls_is_nss ()) | ||
146 | { | ||
147 | aes256_sha = "rsa_aes_256_sha"; | ||
148 | } | ||
149 | |||
150 | gen_test_file_url (url, | 144 | gen_test_file_url (url, |
151 | sizeof (url), | 145 | sizeof (url), |
152 | port); | 146 | port); |
@@ -162,7 +156,6 @@ test_query_session (void) | |||
162 | curl_easy_setopt (c, CURLOPT_FILE, &cbc); | 156 | curl_easy_setopt (c, CURLOPT_FILE, &cbc); |
163 | /* TLS options */ | 157 | /* TLS options */ |
164 | curl_easy_setopt (c, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_1); | 158 | curl_easy_setopt (c, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_1); |
165 | curl_easy_setopt (c, CURLOPT_SSL_CIPHER_LIST, aes256_sha); | ||
166 | /* currently skip any peer authentication */ | 159 | /* currently skip any peer authentication */ |
167 | curl_easy_setopt (c, CURLOPT_SSL_VERIFYPEER, 0L); | 160 | curl_easy_setopt (c, CURLOPT_SSL_VERIFYPEER, 0L); |
168 | curl_easy_setopt (c, CURLOPT_SSL_VERIFYHOST, 0L); | 161 | curl_easy_setopt (c, CURLOPT_SSL_VERIFYHOST, 0L); |
diff --git a/src/testcurl/https/test_tls_authentication.c b/src/testcurl/https/test_tls_authentication.c index bedc3dd9..1fa2f795 100644 --- a/src/testcurl/https/test_tls_authentication.c +++ b/src/testcurl/https/test_tls_authentication.c | |||
@@ -86,7 +86,6 @@ int | |||
86 | main (int argc, char *const *argv) | 86 | main (int argc, char *const *argv) |
87 | { | 87 | { |
88 | unsigned int errorCount = 0; | 88 | unsigned int errorCount = 0; |
89 | const char *aes256_sha = "AES256-SHA"; | ||
90 | (void) argc; | 89 | (void) argc; |
91 | (void) argv; /* Unused. Silent compiler warning. */ | 90 | (void) argv; /* Unused. Silent compiler warning. */ |
92 | 91 | ||
@@ -105,13 +104,8 @@ main (int argc, char *const *argv) | |||
105 | return 77; | 104 | return 77; |
106 | } | 105 | } |
107 | 106 | ||
108 | if (curl_tls_is_nss ()) | ||
109 | { | ||
110 | aes256_sha = "rsa_aes_256_sha"; | ||
111 | } | ||
112 | |||
113 | errorCount += | 107 | errorCount += |
114 | test_secure_get (NULL, aes256_sha, CURL_SSLVERSION_TLSv1); | 108 | test_secure_get (NULL, NULL, CURL_SSLVERSION_TLSv1); |
115 | 109 | ||
116 | print_test_result (errorCount, argv[0]); | 110 | print_test_result (errorCount, argv[0]); |
117 | 111 | ||
diff --git a/src/testcurl/https/test_tls_extensions.c b/src/testcurl/https/test_tls_extensions.c index ecfbf7cc..6cad17e8 100644 --- a/src/testcurl/https/test_tls_extensions.c +++ b/src/testcurl/https/test_tls_extensions.c | |||
@@ -187,7 +187,7 @@ test_hello_extension (gnutls_session_t session, uint16_t port, | |||
187 | gnutls_free (data); | 187 | gnutls_free (data); |
188 | 188 | ||
189 | /* make sure daemon is still functioning */ | 189 | /* make sure daemon is still functioning */ |
190 | if (CURLE_OK != send_curl_req (url, &cbc, "AES128-SHA", | 190 | if (CURLE_OK != send_curl_req (url, &cbc, NULL, |
191 | MHD_GNUTLS_PROTOCOL_TLS1_2)) | 191 | MHD_GNUTLS_PROTOCOL_TLS1_2)) |
192 | { | 192 | { |
193 | ret = -1; | 193 | ret = -1; |
diff --git a/src/testcurl/https/test_tls_options.c b/src/testcurl/https/test_tls_options.c index b0f969a8..7390b89a 100644 --- a/src/testcurl/https/test_tls_options.c +++ b/src/testcurl/https/test_tls_options.c | |||
@@ -89,8 +89,6 @@ main (int argc, char *const *argv) | |||
89 | MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | 89 | MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD |
90 | | MHD_USE_TLS | MHD_USE_ERROR_LOG; | 90 | | MHD_USE_TLS | MHD_USE_ERROR_LOG; |
91 | uint16_t port; | 91 | uint16_t port; |
92 | const char *aes128_sha = "AES128-SHA"; | ||
93 | const char *aes256_sha = "AES256-SHA"; | ||
94 | (void) argc; (void) argv; /* Unused. Silent compiler warning. */ | 92 | (void) argc; (void) argv; /* Unused. Silent compiler warning. */ |
95 | 93 | ||
96 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) | 94 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) |
@@ -139,9 +137,9 @@ main (int argc, char *const *argv) | |||
139 | } | 137 | } |
140 | 138 | ||
141 | if (0 != | 139 | if (0 != |
142 | test_wrap ("TLS1.0-AES-SHA1", | 140 | test_wrap ("TLS1.0", |
143 | &test_https_transfer, NULL, port, daemon_flags, | 141 | &test_https_transfer, NULL, port, daemon_flags, |
144 | aes128_sha, | 142 | NULL, |
145 | CURL_SSLVERSION_TLSv1, | 143 | CURL_SSLVERSION_TLSv1, |
146 | MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, | 144 | MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, |
147 | MHD_OPTION_HTTPS_MEM_CERT, srv_self_signed_cert_pem, | 145 | MHD_OPTION_HTTPS_MEM_CERT, srv_self_signed_cert_pem, |
@@ -149,7 +147,7 @@ main (int argc, char *const *argv) | |||
149 | "NONE:+VERS-TLS1.0:+AES-128-CBC:+SHA1:+RSA:+COMP-NULL", | 147 | "NONE:+VERS-TLS1.0:+AES-128-CBC:+SHA1:+RSA:+COMP-NULL", |
150 | MHD_OPTION_END)) | 148 | MHD_OPTION_END)) |
151 | { | 149 | { |
152 | fprintf (stderr, "TLS1.0-AES-SHA1 test failed\n"); | 150 | fprintf (stderr, "TLS1.0 test failed\n"); |
153 | errorCount++; | 151 | errorCount++; |
154 | } | 152 | } |
155 | fprintf (stderr, | 153 | fprintf (stderr, |
@@ -157,7 +155,7 @@ main (int argc, char *const *argv) | |||
157 | if (0 != | 155 | if (0 != |
158 | test_wrap ("TLS1.1 vs TLS1.0", | 156 | test_wrap ("TLS1.1 vs TLS1.0", |
159 | &test_unmatching_ssl_version, NULL, port, daemon_flags, | 157 | &test_unmatching_ssl_version, NULL, port, daemon_flags, |
160 | aes256_sha, | 158 | NULL, |
161 | CURL_SSLVERSION_TLSv1_1, | 159 | CURL_SSLVERSION_TLSv1_1, |
162 | MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, | 160 | MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, |
163 | MHD_OPTION_HTTPS_MEM_CERT, srv_self_signed_cert_pem, | 161 | MHD_OPTION_HTTPS_MEM_CERT, srv_self_signed_cert_pem, |
diff --git a/src/testcurl/https/tls_test_common.c b/src/testcurl/https/tls_test_common.c index 70606e67..63a79f59 100644 --- a/src/testcurl/https/tls_test_common.c +++ b/src/testcurl/https/tls_test_common.c | |||
@@ -84,8 +84,9 @@ test_daemon_get (void *cls, | |||
84 | /* TLS options */ | 84 | /* TLS options */ |
85 | if ((CURLE_OK != (e = curl_easy_setopt (c, CURLOPT_SSLVERSION, | 85 | if ((CURLE_OK != (e = curl_easy_setopt (c, CURLOPT_SSLVERSION, |
86 | proto_version))) || | 86 | proto_version))) || |
87 | (CURLE_OK != (e = curl_easy_setopt (c, CURLOPT_SSL_CIPHER_LIST, | 87 | ((NULL != cipher_suite) && |
88 | cipher_suite))) || | 88 | (CURLE_OK != (e = curl_easy_setopt (c, CURLOPT_SSL_CIPHER_LIST, |
89 | cipher_suite)))) || | ||
89 | 90 | ||
90 | /* perform peer authentication */ | 91 | /* perform peer authentication */ |
91 | /* TODO merge into send_curl_req */ | 92 | /* TODO merge into send_curl_req */ |
@@ -280,8 +281,9 @@ send_curl_req (char *url, | |||
280 | /* TLS options */ | 281 | /* TLS options */ |
281 | if ((CURLE_OK != (e = curl_easy_setopt (c, CURLOPT_SSLVERSION, | 282 | if ((CURLE_OK != (e = curl_easy_setopt (c, CURLOPT_SSLVERSION, |
282 | proto_version))) || | 283 | proto_version))) || |
283 | (CURLE_OK != (e = curl_easy_setopt (c, CURLOPT_SSL_CIPHER_LIST, | 284 | ((NULL != cipher_suite) && |
284 | cipher_suite))) || | 285 | (CURLE_OK != (e = curl_easy_setopt (c, CURLOPT_SSL_CIPHER_LIST, |
286 | cipher_suite)))) || | ||
285 | /* currently skip any peer authentication */ | 287 | /* currently skip any peer authentication */ |
286 | (CURLE_OK != (e = curl_easy_setopt (c, CURLOPT_SSL_VERIFYPEER, 0L))) || | 288 | (CURLE_OK != (e = curl_easy_setopt (c, CURLOPT_SSL_VERIFYPEER, 0L))) || |
287 | (CURLE_OK != (e = curl_easy_setopt (c, CURLOPT_SSL_VERIFYHOST, 0L)))) | 289 | (CURLE_OK != (e = curl_easy_setopt (c, CURLOPT_SSL_VERIFYHOST, 0L)))) |