diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-11-18 22:11:38 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-11-18 22:11:38 +0000 |
commit | 92b638cf8467f90b6e345046bedd627bf00b8707 (patch) | |
tree | e77247ce1773798422d05c6d2a348fac0f2ea365 | |
parent | 8524a6cfe99a34f776a334652c8558b45792ab12 (diff) | |
download | libmicrohttpd-92b638cf8467f90b6e345046bedd627bf00b8707.tar.gz libmicrohttpd-92b638cf8467f90b6e345046bedd627bf00b8707.zip |
patch fixing #1619
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/testcurl/curl_version_check.c | 12 | ||||
-rw-r--r-- | src/testcurl/https/Makefile.am | 19 | ||||
-rw-r--r-- | src/testcurl/https/mhds_get_test.c | 19 | ||||
-rw-r--r-- | src/testcurl/https/mhds_get_test_select.c | 11 | ||||
-rw-r--r-- | src/testcurl/https/mhds_multi_daemon_test.c | 7 | ||||
-rw-r--r-- | src/testcurl/https/mhds_session_info_test.c | 8 | ||||
-rw-r--r-- | src/testcurl/https/tls_authentication_test.c | 10 | ||||
-rw-r--r-- | src/testcurl/https/tls_daemon_options_test.c | 18 | ||||
-rw-r--r-- | src/testcurl/https/tls_multi_thread_mode_test.c | 10 | ||||
-rw-r--r-- | src/testcurl/https/tls_thread_mode_test.c | 10 |
12 files changed, 105 insertions, 24 deletions
@@ -1,3 +1,6 @@ | |||
1 | Thu Nov 18 23:10:36 CET 2010 | ||
2 | Fixing #1619 (testcases not working with NSS on Fedora). -CG/timn | ||
3 | |||
1 | Thu Nov 18 22:55:58 CET 2010 | 4 | Thu Nov 18 22:55:58 CET 2010 |
2 | Fixing #1621 (socket not closed under certain circumstances). -CG/jaredc | 5 | Fixing #1621 (socket not closed under certain circumstances). -CG/jaredc |
3 | 6 | ||
diff --git a/configure.ac b/configure.ac index fb8a1758..877eab1d 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -211,9 +211,11 @@ then | |||
211 | MHD_REQ_CURL_VERSION=7.16.4 | 211 | MHD_REQ_CURL_VERSION=7.16.4 |
212 | MHD_REQ_CURL_OPENSSL_VERSION=0.9.8 | 212 | MHD_REQ_CURL_OPENSSL_VERSION=0.9.8 |
213 | MHD_REQ_CURL_GNUTLS_VERSION=2.8.6 | 213 | MHD_REQ_CURL_GNUTLS_VERSION=2.8.6 |
214 | MHD_REQ_CURL_NSS_VERSION=3.12.0 | ||
214 | AC_DEFINE_UNQUOTED([MHD_REQ_CURL_VERSION], "$MHD_REQ_CURL_VERSION", [required cURL version to run tests]) | 215 | AC_DEFINE_UNQUOTED([MHD_REQ_CURL_VERSION], "$MHD_REQ_CURL_VERSION", [required cURL version to run tests]) |
215 | AC_DEFINE_UNQUOTED([MHD_REQ_CURL_OPENSSL_VERSION], "$MHD_REQ_CURL_OPENSSL_VERSION", [required cURL SSL version to run tests]) | 216 | AC_DEFINE_UNQUOTED([MHD_REQ_CURL_OPENSSL_VERSION], "$MHD_REQ_CURL_OPENSSL_VERSION", [required cURL SSL version to run tests]) |
216 | AC_DEFINE_UNQUOTED([MHD_REQ_CURL_GNUTLS_VERSION], "$MHD_REQ_CURL_GNUTLS_VERSION", [gnuTLS lib version - used in conjunction with cURL]) | 217 | AC_DEFINE_UNQUOTED([MHD_REQ_CURL_GNUTLS_VERSION], "$MHD_REQ_CURL_GNUTLS_VERSION", [gnuTLS lib version - used in conjunction with cURL]) |
218 | AC_DEFINE_UNQUOTED([MHD_REQ_CURL_NSS_VERSION], "$MHD_REQ_CURL_NSS_VERSION", [NSS lib version - used in conjunction with cURL]) | ||
217 | fi | 219 | fi |
218 | LIBS=$SAVE_LIBS | 220 | LIBS=$SAVE_LIBS |
219 | AM_CONDITIONAL(HAVE_CURL, test x$curl = x1) | 221 | AM_CONDITIONAL(HAVE_CURL, test x$curl = x1) |
diff --git a/src/testcurl/curl_version_check.c b/src/testcurl/curl_version_check.c index 938f60bf..978ca83d 100644 --- a/src/testcurl/curl_version_check.c +++ b/src/testcurl/curl_version_check.c | |||
@@ -67,6 +67,13 @@ parse_version_string (const char *s, int *major, int *minor, int *micro) | |||
67 | return s; | 67 | return s; |
68 | } | 68 | } |
69 | 69 | ||
70 | #if HTTPS_SUPPORT | ||
71 | int | ||
72 | curl_uses_nss_ssl() | ||
73 | { | ||
74 | return (strstr(curl_version(), " NSS/") != NULL) ? 0 : -1; | ||
75 | } | ||
76 | #endif | ||
70 | 77 | ||
71 | /* | 78 | /* |
72 | * check local libcurl version matches required version | 79 | * check local libcurl version matches required version |
@@ -135,6 +142,11 @@ curl_check_version (const char *req_version) | |||
135 | ssl_ver = strchr (ssl_ver, '/'); | 142 | ssl_ver = strchr (ssl_ver, '/'); |
136 | req_ssl_ver = MHD_REQ_CURL_OPENSSL_VERSION; | 143 | req_ssl_ver = MHD_REQ_CURL_OPENSSL_VERSION; |
137 | } | 144 | } |
145 | else if (strncmp ("NSS", ssl_ver, strlen ("NSS")) == 0) | ||
146 | { | ||
147 | ssl_ver = strchr (ssl_ver, '/'); | ||
148 | req_ssl_ver = MHD_REQ_CURL_NSS_VERSION; | ||
149 | } | ||
138 | else | 150 | else |
139 | { | 151 | { |
140 | fprintf (stderr, "Error: unrecognized curl ssl library\n"); | 152 | fprintf (stderr, "Error: unrecognized curl ssl library\n"); |
diff --git a/src/testcurl/https/Makefile.am b/src/testcurl/https/Makefile.am index 4c6b742f..ae79809b 100644 --- a/src/testcurl/https/Makefile.am +++ b/src/testcurl/https/Makefile.am | |||
@@ -46,7 +46,7 @@ tls_session_time_out_test_SOURCES = \ | |||
46 | tls_session_time_out_test_LDADD = \ | 46 | tls_session_time_out_test_LDADD = \ |
47 | $(top_builddir)/src/testcurl/libcurl_version_check.a \ | 47 | $(top_builddir)/src/testcurl/libcurl_version_check.a \ |
48 | $(top_builddir)/src/daemon/libmicrohttpd.la \ | 48 | $(top_builddir)/src/daemon/libmicrohttpd.la \ |
49 | @LIBCURL@ | 49 | @LIBCURL@ -lgnutls @LIBGCRYPT_LIBS@ |
50 | 50 | ||
51 | tls_daemon_options_test_SOURCES = \ | 51 | tls_daemon_options_test_SOURCES = \ |
52 | tls_daemon_options_test.c \ | 52 | tls_daemon_options_test.c \ |
@@ -54,7 +54,7 @@ tls_daemon_options_test_SOURCES = \ | |||
54 | tls_daemon_options_test_LDADD = \ | 54 | tls_daemon_options_test_LDADD = \ |
55 | $(top_builddir)/src/testcurl/libcurl_version_check.a \ | 55 | $(top_builddir)/src/testcurl/libcurl_version_check.a \ |
56 | $(top_builddir)/src/daemon/libmicrohttpd.la \ | 56 | $(top_builddir)/src/daemon/libmicrohttpd.la \ |
57 | @LIBCURL@ | 57 | @LIBCURL@ -lgnutls @LIBGCRYPT_LIBS@ |
58 | 58 | ||
59 | tls_thread_mode_test_SOURCES = \ | 59 | tls_thread_mode_test_SOURCES = \ |
60 | tls_thread_mode_test.c \ | 60 | tls_thread_mode_test.c \ |
@@ -62,7 +62,7 @@ tls_thread_mode_test_SOURCES = \ | |||
62 | tls_thread_mode_test_LDADD = \ | 62 | tls_thread_mode_test_LDADD = \ |
63 | $(top_builddir)/src/testcurl/libcurl_version_check.a \ | 63 | $(top_builddir)/src/testcurl/libcurl_version_check.a \ |
64 | $(top_builddir)/src/daemon/libmicrohttpd.la \ | 64 | $(top_builddir)/src/daemon/libmicrohttpd.la \ |
65 | @LIBCURL@ | 65 | @LIBCURL@ -lgnutls @LIBGCRYPT_LIBS@ |
66 | 66 | ||
67 | tls_multi_thread_mode_test_SOURCES = \ | 67 | tls_multi_thread_mode_test_SOURCES = \ |
68 | tls_multi_thread_mode_test.c \ | 68 | tls_multi_thread_mode_test.c \ |
@@ -70,7 +70,7 @@ tls_multi_thread_mode_test_SOURCES = \ | |||
70 | tls_multi_thread_mode_test_LDADD = \ | 70 | tls_multi_thread_mode_test_LDADD = \ |
71 | $(top_builddir)/src/testcurl/libcurl_version_check.a \ | 71 | $(top_builddir)/src/testcurl/libcurl_version_check.a \ |
72 | $(top_builddir)/src/daemon/libmicrohttpd.la \ | 72 | $(top_builddir)/src/daemon/libmicrohttpd.la \ |
73 | @LIBCURL@ | 73 | @LIBCURL@ -lgnutls @LIBGCRYPT_LIBS@ |
74 | 74 | ||
75 | tls_authentication_test_SOURCES = \ | 75 | tls_authentication_test_SOURCES = \ |
76 | tls_authentication_test.c \ | 76 | tls_authentication_test.c \ |
@@ -78,7 +78,7 @@ tls_authentication_test_SOURCES = \ | |||
78 | tls_authentication_test_LDADD = \ | 78 | tls_authentication_test_LDADD = \ |
79 | $(top_builddir)/src/testcurl/libcurl_version_check.a \ | 79 | $(top_builddir)/src/testcurl/libcurl_version_check.a \ |
80 | $(top_builddir)/src/daemon/libmicrohttpd.la \ | 80 | $(top_builddir)/src/daemon/libmicrohttpd.la \ |
81 | @LIBCURL@ | 81 | @LIBCURL@ -lgnutls @LIBGCRYPT_LIBS@ |
82 | 82 | ||
83 | mhds_session_info_test_SOURCES = \ | 83 | mhds_session_info_test_SOURCES = \ |
84 | mhds_session_info_test.c \ | 84 | mhds_session_info_test.c \ |
@@ -86,7 +86,7 @@ mhds_session_info_test_SOURCES = \ | |||
86 | mhds_session_info_test_LDADD = \ | 86 | mhds_session_info_test_LDADD = \ |
87 | $(top_builddir)/src/testcurl/libcurl_version_check.a \ | 87 | $(top_builddir)/src/testcurl/libcurl_version_check.a \ |
88 | $(top_builddir)/src/daemon/libmicrohttpd.la \ | 88 | $(top_builddir)/src/daemon/libmicrohttpd.la \ |
89 | @LIBCURL@ | 89 | @LIBCURL@ -lgnutls @LIBGCRYPT_LIBS@ |
90 | 90 | ||
91 | mhds_multi_daemon_test_SOURCES = \ | 91 | mhds_multi_daemon_test_SOURCES = \ |
92 | mhds_multi_daemon_test.c \ | 92 | mhds_multi_daemon_test.c \ |
@@ -94,7 +94,7 @@ mhds_multi_daemon_test_SOURCES = \ | |||
94 | mhds_multi_daemon_test_LDADD = \ | 94 | mhds_multi_daemon_test_LDADD = \ |
95 | $(top_builddir)/src/testcurl/libcurl_version_check.a \ | 95 | $(top_builddir)/src/testcurl/libcurl_version_check.a \ |
96 | $(top_builddir)/src/daemon/libmicrohttpd.la \ | 96 | $(top_builddir)/src/daemon/libmicrohttpd.la \ |
97 | @LIBCURL@ | 97 | @LIBCURL@ -lgnutls @LIBGCRYPT_LIBS@ |
98 | 98 | ||
99 | mhds_get_test_SOURCES = \ | 99 | mhds_get_test_SOURCES = \ |
100 | mhds_get_test.c \ | 100 | mhds_get_test.c \ |
@@ -102,7 +102,7 @@ mhds_get_test_SOURCES = \ | |||
102 | mhds_get_test_LDADD = \ | 102 | mhds_get_test_LDADD = \ |
103 | $(top_builddir)/src/testcurl/libcurl_version_check.a \ | 103 | $(top_builddir)/src/testcurl/libcurl_version_check.a \ |
104 | $(top_builddir)/src/daemon/libmicrohttpd.la \ | 104 | $(top_builddir)/src/daemon/libmicrohttpd.la \ |
105 | @LIBCURL@ | 105 | @LIBCURL@ -lgnutls @LIBGCRYPT_LIBS@ |
106 | 106 | ||
107 | 107 | ||
108 | mhds_get_test_select_SOURCES = \ | 108 | mhds_get_test_select_SOURCES = \ |
@@ -111,4 +111,5 @@ mhds_get_test_select_SOURCES = \ | |||
111 | mhds_get_test_select_LDADD = \ | 111 | mhds_get_test_select_LDADD = \ |
112 | $(top_builddir)/src/testcurl/libcurl_version_check.a \ | 112 | $(top_builddir)/src/testcurl/libcurl_version_check.a \ |
113 | $(top_builddir)/src/daemon/libmicrohttpd.la \ | 113 | $(top_builddir)/src/daemon/libmicrohttpd.la \ |
114 | @LIBCURL@ | 114 | @LIBCURL@ -lgnutls @LIBGCRYPT_LIBS@ |
115 | |||
diff --git a/src/testcurl/https/mhds_get_test.c b/src/testcurl/https/mhds_get_test.c index fd4df90b..4b065fae 100644 --- a/src/testcurl/https/mhds_get_test.c +++ b/src/testcurl/https/mhds_get_test.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include "tls_test_common.h" | 33 | #include "tls_test_common.h" |
34 | 34 | ||
35 | int curl_check_version (const char *req_version, ...); | 35 | int curl_check_version (const char *req_version, ...); |
36 | int curl_uses_nss_ssl (); | ||
36 | extern const char srv_key_pem[]; | 37 | extern const char srv_key_pem[]; |
37 | extern const char srv_self_signed_cert_pem[]; | 38 | extern const char srv_self_signed_cert_pem[]; |
38 | extern const char srv_signed_cert_pem[]; | 39 | extern const char srv_signed_cert_pem[]; |
@@ -101,12 +102,24 @@ main (int argc, char *const *argv) | |||
101 | fprintf (stderr, "Error: %s\n", strerror (errno)); | 102 | fprintf (stderr, "Error: %s\n", strerror (errno)); |
102 | return -1; | 103 | return -1; |
103 | } | 104 | } |
105 | |||
106 | char *aes256_sha_tlsv1 = "AES256-SHA"; | ||
107 | char *aes256_sha_sslv3 = "AES256-SHA"; | ||
108 | char *des_cbc3_sha_tlsv1 = "DES-CBC3-SHA"; | ||
109 | |||
110 | if (curl_uses_nss_ssl() == 0) | ||
111 | { | ||
112 | aes256_sha_tlsv1 = "rsa_aes_256_sha"; | ||
113 | aes256_sha_sslv3 = "rsa_aes_256_sha"; | ||
114 | des_cbc3_sha_tlsv1 = "rsa_aes_128_sha"; | ||
115 | } | ||
116 | |||
104 | errorCount += | 117 | errorCount += |
105 | test_secure_get (NULL, "AES256-SHA", CURL_SSLVERSION_TLSv1); | 118 | test_secure_get (NULL, aes256_sha_tlsv1, CURL_SSLVERSION_TLSv1); |
106 | errorCount += | 119 | errorCount += |
107 | test_secure_get (NULL, "AES256-SHA", CURL_SSLVERSION_SSLv3); | 120 | test_secure_get (NULL, aes256_sha_sslv3, CURL_SSLVERSION_SSLv3); |
108 | errorCount += | 121 | errorCount += |
109 | test_cipher_option (NULL, "DES-CBC3-SHA", CURL_SSLVERSION_TLSv1); | 122 | test_cipher_option (NULL, des_cbc3_sha_tlsv1, CURL_SSLVERSION_TLSv1); |
110 | 123 | ||
111 | print_test_result (errorCount, argv[0]); | 124 | print_test_result (errorCount, argv[0]); |
112 | 125 | ||
diff --git a/src/testcurl/https/mhds_get_test_select.c b/src/testcurl/https/mhds_get_test_select.c index 64ac88ac..323a18a1 100644 --- a/src/testcurl/https/mhds_get_test_select.c +++ b/src/testcurl/https/mhds_get_test_select.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include "tls_test_common.h" | 33 | #include "tls_test_common.h" |
34 | 34 | ||
35 | int curl_check_version (const char *req_version, ...); | 35 | int curl_check_version (const char *req_version, ...); |
36 | int curl_uses_nss_ssl (); | ||
36 | extern const char srv_key_pem[]; | 37 | extern const char srv_key_pem[]; |
37 | extern const char srv_self_signed_cert_pem[]; | 38 | extern const char srv_self_signed_cert_pem[]; |
38 | extern const char srv_signed_cert_pem[]; | 39 | extern const char srv_signed_cert_pem[]; |
@@ -100,10 +101,20 @@ testExternalGet () | |||
100 | MHD_OPTION_END); | 101 | MHD_OPTION_END); |
101 | if (d == NULL) | 102 | if (d == NULL) |
102 | return 256; | 103 | return 256; |
104 | |||
105 | char *aes256_sha = "AES256-SHA"; | ||
106 | if (curl_uses_nss_ssl() == 0) | ||
107 | { | ||
108 | aes256_sha = "rsa_aes_256_sha"; | ||
109 | } | ||
110 | |||
103 | c = curl_easy_init (); | 111 | c = curl_easy_init (); |
104 | curl_easy_setopt (c, CURLOPT_URL, "https://localhost:1082/hello_world"); | 112 | curl_easy_setopt (c, CURLOPT_URL, "https://localhost:1082/hello_world"); |
105 | curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, ©Buffer); | 113 | curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, ©Buffer); |
106 | curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); | 114 | curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); |
115 | /* TLS options */ | ||
116 | curl_easy_setopt (c, CURLOPT_SSLVERSION, CURL_SSLVERSION_SSLv3); | ||
117 | curl_easy_setopt (c, CURLOPT_SSL_CIPHER_LIST, aes256_sha); | ||
107 | curl_easy_setopt (c, CURLOPT_SSL_VERIFYPEER, 0); | 118 | curl_easy_setopt (c, CURLOPT_SSL_VERIFYPEER, 0); |
108 | curl_easy_setopt (c, CURLOPT_SSL_VERIFYHOST, 0); | 119 | curl_easy_setopt (c, CURLOPT_SSL_VERIFYHOST, 0); |
109 | curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); | 120 | curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); |
diff --git a/src/testcurl/https/mhds_multi_daemon_test.c b/src/testcurl/https/mhds_multi_daemon_test.c index 51c90158..4713f1ea 100644 --- a/src/testcurl/https/mhds_multi_daemon_test.c +++ b/src/testcurl/https/mhds_multi_daemon_test.c | |||
@@ -106,9 +106,14 @@ main (int argc, char *const *argv) | |||
106 | return -1; | 106 | return -1; |
107 | } | 107 | } |
108 | 108 | ||
109 | char *aes256_sha = "AES256-SHA"; | ||
110 | if (curl_uses_nss_ssl() == 0) | ||
111 | { | ||
112 | aes256_sha = "rsa_aes_256_sha"; | ||
113 | } | ||
109 | 114 | ||
110 | errorCount += | 115 | errorCount += |
111 | test_concurent_daemon_pair (NULL, "AES256-SHA", CURL_SSLVERSION_SSLv3); | 116 | test_concurent_daemon_pair (NULL, aes256_sha, CURL_SSLVERSION_SSLv3); |
112 | 117 | ||
113 | print_test_result (errorCount, "concurent_daemon_pair"); | 118 | print_test_result (errorCount, "concurent_daemon_pair"); |
114 | 119 | ||
diff --git a/src/testcurl/https/mhds_session_info_test.c b/src/testcurl/https/mhds_session_info_test.c index eefc05fe..a5ff42f8 100644 --- a/src/testcurl/https/mhds_session_info_test.c +++ b/src/testcurl/https/mhds_session_info_test.c | |||
@@ -116,6 +116,12 @@ test_query_session () | |||
116 | if (d == NULL) | 116 | if (d == NULL) |
117 | return 2; | 117 | return 2; |
118 | 118 | ||
119 | char *aes256_sha = "AES256-SHA"; | ||
120 | if (curl_uses_nss_ssl() == 0) | ||
121 | { | ||
122 | aes256_sha = "rsa_aes_256_sha"; | ||
123 | } | ||
124 | |||
119 | c = curl_easy_init (); | 125 | c = curl_easy_init (); |
120 | #if DEBUG_HTTPS_TEST | 126 | #if DEBUG_HTTPS_TEST |
121 | curl_easy_setopt (c, CURLOPT_VERBOSE, 1); | 127 | curl_easy_setopt (c, CURLOPT_VERBOSE, 1); |
@@ -128,7 +134,7 @@ test_query_session () | |||
128 | curl_easy_setopt (c, CURLOPT_FILE, &cbc); | 134 | curl_easy_setopt (c, CURLOPT_FILE, &cbc); |
129 | /* TLS options */ | 135 | /* TLS options */ |
130 | curl_easy_setopt (c, CURLOPT_SSLVERSION, CURL_SSLVERSION_SSLv3); | 136 | curl_easy_setopt (c, CURLOPT_SSLVERSION, CURL_SSLVERSION_SSLv3); |
131 | curl_easy_setopt (c, CURLOPT_SSL_CIPHER_LIST, "AES256-SHA"); | 137 | curl_easy_setopt (c, CURLOPT_SSL_CIPHER_LIST, aes256_sha); |
132 | /* currently skip any peer authentication */ | 138 | /* currently skip any peer authentication */ |
133 | curl_easy_setopt (c, CURLOPT_SSL_VERIFYPEER, 0); | 139 | curl_easy_setopt (c, CURLOPT_SSL_VERIFYPEER, 0); |
134 | curl_easy_setopt (c, CURLOPT_SSL_VERIFYHOST, 0); | 140 | curl_easy_setopt (c, CURLOPT_SSL_VERIFYHOST, 0); |
diff --git a/src/testcurl/https/tls_authentication_test.c b/src/testcurl/https/tls_authentication_test.c index 77b122f9..cb80475c 100644 --- a/src/testcurl/https/tls_authentication_test.c +++ b/src/testcurl/https/tls_authentication_test.c | |||
@@ -62,7 +62,7 @@ test_secure_get (void * cls, char *cipher_suite, int proto_version) | |||
62 | return -1; | 62 | return -1; |
63 | } | 63 | } |
64 | 64 | ||
65 | ret = test_daemon_get (NULL, cipher_suite, proto_version, DEAMON_TEST_PORT, 1); | 65 | ret = test_daemon_get (NULL, cipher_suite, proto_version, DEAMON_TEST_PORT, 0); |
66 | 66 | ||
67 | MHD_stop_daemon (d); | 67 | MHD_stop_daemon (d); |
68 | return ret; | 68 | return ret; |
@@ -86,8 +86,14 @@ main (int argc, char *const *argv) | |||
86 | return -1; | 86 | return -1; |
87 | } | 87 | } |
88 | 88 | ||
89 | char *aes256_sha = "AES256-SHA"; | ||
90 | if (curl_uses_nss_ssl() == 0) | ||
91 | { | ||
92 | aes256_sha = "rsa_aes_256_sha"; | ||
93 | } | ||
94 | |||
89 | errorCount += | 95 | errorCount += |
90 | test_secure_get (NULL, "AES256-SHA", CURL_SSLVERSION_TLSv1); | 96 | test_secure_get (NULL, aes256_sha, CURL_SSLVERSION_TLSv1); |
91 | 97 | ||
92 | print_test_result (errorCount, argv[0]); | 98 | print_test_result (errorCount, argv[0]); |
93 | 99 | ||
diff --git a/src/testcurl/https/tls_daemon_options_test.c b/src/testcurl/https/tls_daemon_options_test.c index f4153011..d4c25232 100644 --- a/src/testcurl/https/tls_daemon_options_test.c +++ b/src/testcurl/https/tls_daemon_options_test.c | |||
@@ -94,10 +94,20 @@ main (int argc, char *const *argv) | |||
94 | fprintf (stderr, "Error: %s\n", strerror (errno)); | 94 | fprintf (stderr, "Error: %s\n", strerror (errno)); |
95 | return 0; | 95 | return 0; |
96 | } | 96 | } |
97 | |||
98 | char *aes128_sha = "AES128-SHA"; | ||
99 | char *aes256_sha = "AES256-SHA"; | ||
100 | if (curl_uses_nss_ssl() == 0) | ||
101 | { | ||
102 | aes128_sha = "rsa_aes_128_sha"; | ||
103 | aes256_sha = "rsa_aes_256_sha"; | ||
104 | } | ||
105 | |||
106 | |||
97 | errorCount += | 107 | errorCount += |
98 | test_wrap ("TLS1.0-AES-SHA1", | 108 | test_wrap ("TLS1.0-AES-SHA1", |
99 | &test_https_transfer, NULL, daemon_flags, | 109 | &test_https_transfer, NULL, daemon_flags, |
100 | "AES128-SHA1", | 110 | aes128_sha, |
101 | CURL_SSLVERSION_TLSv1, | 111 | CURL_SSLVERSION_TLSv1, |
102 | MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, | 112 | MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, |
103 | MHD_OPTION_HTTPS_MEM_CERT, srv_self_signed_cert_pem, | 113 | MHD_OPTION_HTTPS_MEM_CERT, srv_self_signed_cert_pem, |
@@ -106,7 +116,7 @@ main (int argc, char *const *argv) | |||
106 | errorCount += | 116 | errorCount += |
107 | test_wrap ("TLS1.0-AES-SHA1", | 117 | test_wrap ("TLS1.0-AES-SHA1", |
108 | &test_https_transfer, NULL, daemon_flags, | 118 | &test_https_transfer, NULL, daemon_flags, |
109 | "AES128-SHA1", | 119 | aes128_sha, |
110 | CURL_SSLVERSION_SSLv3, | 120 | CURL_SSLVERSION_SSLv3, |
111 | MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, | 121 | MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, |
112 | MHD_OPTION_HTTPS_MEM_CERT, srv_self_signed_cert_pem, | 122 | MHD_OPTION_HTTPS_MEM_CERT, srv_self_signed_cert_pem, |
@@ -116,7 +126,7 @@ main (int argc, char *const *argv) | |||
116 | errorCount += | 126 | errorCount += |
117 | test_wrap ("SSL3.0-AES-SHA1", | 127 | test_wrap ("SSL3.0-AES-SHA1", |
118 | &test_https_transfer, NULL, daemon_flags, | 128 | &test_https_transfer, NULL, daemon_flags, |
119 | "AES128-SHA1", | 129 | aes128_sha, |
120 | CURL_SSLVERSION_SSLv3, | 130 | CURL_SSLVERSION_SSLv3, |
121 | MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, | 131 | MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, |
122 | MHD_OPTION_HTTPS_MEM_CERT, srv_self_signed_cert_pem, | 132 | MHD_OPTION_HTTPS_MEM_CERT, srv_self_signed_cert_pem, |
@@ -141,7 +151,7 @@ main (int argc, char *const *argv) | |||
141 | errorCount += | 151 | errorCount += |
142 | test_wrap ("TLS1.0 vs SSL3", | 152 | test_wrap ("TLS1.0 vs SSL3", |
143 | &test_unmatching_ssl_version, NULL, daemon_flags, | 153 | &test_unmatching_ssl_version, NULL, daemon_flags, |
144 | "AES256-SHA", | 154 | aes256_sha, |
145 | CURL_SSLVERSION_SSLv3, | 155 | CURL_SSLVERSION_SSLv3, |
146 | MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, | 156 | MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, |
147 | MHD_OPTION_HTTPS_MEM_CERT, srv_self_signed_cert_pem, | 157 | MHD_OPTION_HTTPS_MEM_CERT, srv_self_signed_cert_pem, |
diff --git a/src/testcurl/https/tls_multi_thread_mode_test.c b/src/testcurl/https/tls_multi_thread_mode_test.c index 2bd32a25..42842cc0 100644 --- a/src/testcurl/https/tls_multi_thread_mode_test.c +++ b/src/testcurl/https/tls_multi_thread_mode_test.c | |||
@@ -136,11 +136,17 @@ main (int argc, char *const *argv) | |||
136 | return -1; | 136 | return -1; |
137 | } | 137 | } |
138 | 138 | ||
139 | char *aes256_sha = "AES256-SHA"; | ||
140 | if (curl_uses_nss_ssl() == 0) | ||
141 | { | ||
142 | aes256_sha = "rsa_aes_256_sha"; | ||
143 | } | ||
144 | |||
139 | errorCount += | 145 | errorCount += |
140 | test_wrap ("multi threaded daemon, single client", &test_single_client, | 146 | test_wrap ("multi threaded daemon, single client", &test_single_client, |
141 | NULL, | 147 | NULL, |
142 | MHD_USE_SSL | MHD_USE_DEBUG | MHD_USE_THREAD_PER_CONNECTION, | 148 | MHD_USE_SSL | MHD_USE_DEBUG | MHD_USE_THREAD_PER_CONNECTION, |
143 | "AES256-SHA", CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, | 149 | aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, |
144 | srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, | 150 | srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, |
145 | srv_self_signed_cert_pem, MHD_OPTION_END); | 151 | srv_self_signed_cert_pem, MHD_OPTION_END); |
146 | 152 | ||
@@ -148,7 +154,7 @@ main (int argc, char *const *argv) | |||
148 | test_wrap ("multi threaded daemon, parallel client", | 154 | test_wrap ("multi threaded daemon, parallel client", |
149 | &test_parallel_clients, NULL, | 155 | &test_parallel_clients, NULL, |
150 | MHD_USE_SSL | MHD_USE_DEBUG | MHD_USE_THREAD_PER_CONNECTION, | 156 | MHD_USE_SSL | MHD_USE_DEBUG | MHD_USE_THREAD_PER_CONNECTION, |
151 | "AES256-SHA", CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, | 157 | aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, |
152 | srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, | 158 | srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, |
153 | srv_self_signed_cert_pem, MHD_OPTION_END); | 159 | srv_self_signed_cert_pem, MHD_OPTION_END); |
154 | 160 | ||
diff --git a/src/testcurl/https/tls_thread_mode_test.c b/src/testcurl/https/tls_thread_mode_test.c index 21bfc0a4..dc0edcab 100644 --- a/src/testcurl/https/tls_thread_mode_test.c +++ b/src/testcurl/https/tls_thread_mode_test.c | |||
@@ -137,11 +137,17 @@ main (int argc, char *const *argv) | |||
137 | return -1; | 137 | return -1; |
138 | } | 138 | } |
139 | 139 | ||
140 | char *aes256_sha = "AES256-SHA"; | ||
141 | if (curl_uses_nss_ssl() == 0) | ||
142 | { | ||
143 | aes256_sha = "rsa_aes_256_sha"; | ||
144 | } | ||
145 | |||
140 | errorCount += | 146 | errorCount += |
141 | test_wrap ("single threaded daemon, single client", &test_single_client, | 147 | test_wrap ("single threaded daemon, single client", &test_single_client, |
142 | NULL, | 148 | NULL, |
143 | MHD_USE_SELECT_INTERNALLY | MHD_USE_SSL | MHD_USE_DEBUG, | 149 | MHD_USE_SELECT_INTERNALLY | MHD_USE_SSL | MHD_USE_DEBUG, |
144 | "AES256-SHA", CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, | 150 | aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, |
145 | srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, | 151 | srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, |
146 | srv_self_signed_cert_pem, MHD_OPTION_END); | 152 | srv_self_signed_cert_pem, MHD_OPTION_END); |
147 | 153 | ||
@@ -149,7 +155,7 @@ main (int argc, char *const *argv) | |||
149 | test_wrap ("single threaded daemon, parallel clients", | 155 | test_wrap ("single threaded daemon, parallel clients", |
150 | &test_parallel_clients, NULL, | 156 | &test_parallel_clients, NULL, |
151 | MHD_USE_SELECT_INTERNALLY | MHD_USE_SSL | MHD_USE_DEBUG, | 157 | MHD_USE_SELECT_INTERNALLY | MHD_USE_SSL | MHD_USE_DEBUG, |
152 | "AES256-SHA", CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, | 158 | aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, |
153 | srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, | 159 | srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, |
154 | srv_self_signed_cert_pem, MHD_OPTION_END); | 160 | srv_self_signed_cert_pem, MHD_OPTION_END); |
155 | 161 | ||