diff options
Diffstat (limited to 'src/daemon/connection_https.c')
-rw-r--r-- | src/daemon/connection_https.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/daemon/connection_https.c b/src/daemon/connection_https.c index df91af10..20baa770 100644 --- a/src/daemon/connection_https.c +++ b/src/daemon/connection_https.c | |||
@@ -87,7 +87,7 @@ MHD_get_connection_info (struct MHD_Connection *connection, | |||
87 | /** | 87 | /** |
88 | * This function is called once a secure connection has been marked | 88 | * This function is called once a secure connection has been marked |
89 | * for closure. | 89 | * for closure. |
90 | * | 90 | * |
91 | * NOTE: Some code duplication with connection_close_error | 91 | * NOTE: Some code duplication with connection_close_error |
92 | * in connection.c | 92 | * in connection.c |
93 | * | 93 | * |
@@ -216,6 +216,7 @@ MHD_tls_connection_handle_read (struct MHD_Connection *connection) | |||
216 | { | 216 | { |
217 | /* set connection state to enable HTTP processing */ | 217 | /* set connection state to enable HTTP processing */ |
218 | connection->state = MHD_CONNECTION_INIT; | 218 | connection->state = MHD_CONNECTION_INIT; |
219 | break; | ||
219 | } | 220 | } |
220 | /* set connection as closed */ | 221 | /* set connection as closed */ |
221 | else | 222 | else |
@@ -227,7 +228,6 @@ MHD_tls_connection_handle_read (struct MHD_Connection *connection) | |||
227 | connection->state = MHD_TLS_HANDSHAKE_FAILED; | 228 | connection->state = MHD_TLS_HANDSHAKE_FAILED; |
228 | return MHD_NO; | 229 | return MHD_NO; |
229 | } | 230 | } |
230 | break; | ||
231 | } | 231 | } |
232 | /* a handshake message has been received out of bound */ | 232 | /* a handshake message has been received out of bound */ |
233 | else | 233 | else |
@@ -241,7 +241,7 @@ MHD_tls_connection_handle_read (struct MHD_Connection *connection) | |||
241 | return MHD_NO; | 241 | return MHD_NO; |
242 | } | 242 | } |
243 | 243 | ||
244 | /* ignore any out of bound change chiper spec messages */ | 244 | /* ignore any out of bound change chiper spec messages */ |
245 | case GNUTLS_CHANGE_CIPHER_SPEC: | 245 | case GNUTLS_CHANGE_CIPHER_SPEC: |
246 | MHD_tls_connection_close (connection, | 246 | MHD_tls_connection_close (connection, |
247 | MHD_TLS_REQUEST_TERMINATED_WITH_ERROR); | 247 | MHD_TLS_REQUEST_TERMINATED_WITH_ERROR); |
@@ -303,9 +303,12 @@ MHD_tls_connection_handle_read (struct MHD_Connection *connection) | |||
303 | default: | 303 | default: |
304 | #if HAVE_MESSAGES | 304 | #if HAVE_MESSAGES |
305 | MHD_DLOG (connection->daemon, | 305 | MHD_DLOG (connection->daemon, |
306 | "Error: unrecognized TLS read message. con-state: %d. l: %d, f: %s\n", | 306 | "Error: unrecognized TLS message type: %d, connection state: %s. l: %d, f: %s\n", |
307 | connection->state, __LINE__, __FUNCTION__); | 307 | msg_type, MHD_state_to_string(connection->state), __LINE__, __FUNCTION__); |
308 | #endif | 308 | #endif |
309 | /* close connection upon reception of unrecognized message type */ | ||
310 | MHD_tls_connection_close (connection, | ||
311 | MHD_TLS_REQUEST_TERMINATED_WITH_ERROR); | ||
309 | return MHD_NO; | 312 | return MHD_NO; |
310 | } | 313 | } |
311 | 314 | ||