aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2008-11-16 07:36:05 +0000
committerChristian Grothoff <christian@grothoff.org>2008-11-16 07:36:05 +0000
commit2d2199d702a434a3e58d672ad213586b5a856e7a (patch)
treeb1d730027fdc6b9c25e5c8630425fa7571a9121d
parentacb3ed7e80ff0c6a8dd3b5dde7c09334302fb664 (diff)
downloadlibmicrohttpd-2d2199d702a434a3e58d672ad213586b5a856e7a.tar.gz
libmicrohttpd-2d2199d702a434a3e58d672ad213586b5a856e7a.zip
fix
-rw-r--r--src/testcurl/https/tls_cipher_change_test.c47
-rw-r--r--src/testcurl/https/tls_session_time_out_test.c1
2 files changed, 0 insertions, 48 deletions
diff --git a/src/testcurl/https/tls_cipher_change_test.c b/src/testcurl/https/tls_cipher_change_test.c
index 78881a62..9a6fe0bd 100644
--- a/src/testcurl/https/tls_cipher_change_test.c
+++ b/src/testcurl/https/tls_cipher_change_test.c
@@ -150,52 +150,6 @@ test_out_of_context_cipher_change (MHD_gtls_session_t session)
150 } 150 }
151 151
152 close (sd); 152 close (sd);
153 fprintf (stderr, "%s. f: %s, l: %d\n", "ok", __FUNCTION__, __LINE__);
154 return 0;
155}
156
157/* */
158static int
159test_rehandshake (MHD_gtls_session_t session)
160{
161 int sd, ret;
162 struct sockaddr_in sa;
163
164 sd = socket (AF_INET, SOCK_STREAM, 0);
165 memset (&sa, '\0', sizeof (struct sockaddr_in));
166 sa.sin_family = AF_INET;
167 sa.sin_port = htons (42433);
168 inet_pton (AF_INET, "127.0.0.1", &sa.sin_addr);
169
170 MHD__gnutls_transport_set_ptr (session, (MHD_gnutls_transport_ptr_t) sd);
171
172 ret = connect (sd, &sa, sizeof (struct sockaddr_in));
173
174 if (ret < 0)
175 {
176 fprintf (stderr, "Error: %s)\n", MHD_E_FAILED_TO_CONNECT);
177 return -1;
178 }
179
180 ret = MHD__gnutls_handshake (session);
181 if (ret < 0)
182 {
183 return 1;
184 }
185
186 ret = MHD__gnutls_record_send (session, http_get_req, strlen (http_get_req));
187
188 /* check server responds with a 'close-notify' */
189 MHD_gtls_recv_int (session, GNUTLS_ALERT, GNUTLS_HANDSHAKE_FINISHED, 0, 0);
190
191
192 /* CLOSE_NOTIFY */
193 if (session->internals.last_alert != GNUTLS_A_CLOSE_NOTIFY)
194 {
195 return 1;
196 }
197
198 close (sd);
199 return 0; 153 return 0;
200} 154}
201 155
@@ -227,7 +181,6 @@ main (int argc, char *const *argv)
227 181
228 setup (&session, &key, &cert, &xcred); 182 setup (&session, &key, &cert, &xcred);
229 errorCount += test_out_of_context_cipher_change (session); 183 errorCount += test_out_of_context_cipher_change (session);
230 errorCount += test_rehandshake (session);
231 teardown (session, &key, &cert, xcred); 184 teardown (session, &key, &cert, xcred);
232 185
233 if (errorCount != 0) 186 if (errorCount != 0)
diff --git a/src/testcurl/https/tls_session_time_out_test.c b/src/testcurl/https/tls_session_time_out_test.c
index 1fe6cc1c..3748dabf 100644
--- a/src/testcurl/https/tls_session_time_out_test.c
+++ b/src/testcurl/https/tls_session_time_out_test.c
@@ -135,7 +135,6 @@ test_tls_session_time_out (MHD_gtls_session_t session)
135 } 135 }
136 136
137 close (sd); 137 close (sd);
138 fprintf (stderr, "%s. f: %s, l: %d\n", "ok", __FUNCTION__, __LINE__);
139 return 0; 138 return 0;
140} 139}
141 140