34 #include <gnutls/gnutls.h>
50 gnutls_bye (connection->tls_session, GNUTLS_SHUT_RDWR);
80 ret = gnutls_handshake (connection->tls_session);
81 if (ret == GNUTLS_E_SUCCESS)
87 if ( (ret == GNUTLS_E_AGAIN) ||
88 (ret == GNUTLS_E_INTERRUPTED) )
95 MHD_DLOG (connection->
daemon,
96 "Error: received handshake message out of context\n");
122 MHD_DLOG (connection->
daemon,
"%s: state: %s\n",
123 __FUNCTION__, MHD_state_to_string (connection->
state));
127 ret = gnutls_handshake (connection->tls_session);
128 if (ret == GNUTLS_E_SUCCESS)
134 if ( (ret == GNUTLS_E_AGAIN) ||
135 (ret == GNUTLS_E_INTERRUPTED) )
142 MHD_DLOG (connection->
daemon,
143 "Error: received handshake message out of context\n");
166 unsigned int timeout;
169 MHD_DLOG (connection->
daemon,
"%s: state: %s\n",
170 __FUNCTION__, MHD_state_to_string (connection->
state));
173 if ((connection->
socket_fd != -1) && (timeout != 0)
180 switch (connection->
state)
192 if ( (0 != gnutls_record_check_pending (connection->tls_session)) &&