37 #include <gnutls/gnutls.h>
60 res = gnutls_record_recv (connection->tls_session,
63 if ( (GNUTLS_E_AGAIN == res) ||
64 (GNUTLS_E_INTERRUPTED == res) )
67 if (GNUTLS_E_AGAIN == res)
77 if ( (GNUTLS_E_DECRYPTION_FAILED == res) ||
78 (GNUTLS_E_INVALID_SESSION == res) ||
79 (GNUTLS_E_DECOMPRESSION_FAILED == res) ||
80 (GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER == res) ||
81 (GNUTLS_E_UNSUPPORTED_VERSION_PACKET == res) ||
82 (GNUTLS_E_UNEXPECTED_PACKET_LENGTH == res) ||
83 (GNUTLS_E_UNEXPECTED_PACKET == res) ||
84 (GNUTLS_E_UNEXPECTED_HANDSHAKE_PACKET == res) ||
85 (GNUTLS_E_EXPIRED == res) ||
86 (GNUTLS_E_REHANDSHAKE == res) )
88 if ( (GNUTLS_E_PULL_ERROR == res) ||
89 (GNUTLS_E_INTERNAL_ERROR == res) ||
90 (GNUTLS_E_CRYPTODEV_IOCTL_ERROR == res) ||
91 (GNUTLS_E_CRYPTODEV_DEVICE_ERROR == res) )
93 if (GNUTLS_E_PREMATURE_TERMINATION == res)
95 if (GNUTLS_E_MEMORY_ERROR == res)
109 (0 != gnutls_record_check_pending (
110 connection->tls_session)) );
142 ret = gnutls_handshake (connection->tls_session);
143 if (ret == GNUTLS_E_SUCCESS)
150 if ( (GNUTLS_E_AGAIN == ret) ||
151 (GNUTLS_E_INTERRUPTED == ret) )
160 MHD_DLOG (connection->
daemon,
161 _ (
"Error: received handshake message out of context.\n"));
196 gnutls_bye (connection->tls_session, GNUTLS_SHUT_WR);
197 if (GNUTLS_E_SUCCESS == res)
202 if ((GNUTLS_E_AGAIN == res) ||
203 (GNUTLS_E_INTERRUPTED == res))
Methods for managing connections.
void MHD_connection_close_(struct MHD_Connection *connection, enum MHD_RequestTerminationCode rtc)
bool MHD_tls_connection_shutdown(struct MHD_Connection *connection)
void MHD_set_https_callbacks(struct MHD_Connection *connection)
static ssize_t recv_tls_adapter(struct MHD_Connection *connection, void *other, size_t i)
bool MHD_run_tls_handshake_(struct MHD_Connection *connection)
Methods for managing connections.
void MHD_update_last_activity_(struct MHD_Connection *connection)
@ MHD_REQUEST_TERMINATED_WITH_ERROR
#define MHD_ERR_CONNRESET_
@ MHD_EPOLL_STATE_READ_READY
bool MHD_connection_set_nodelay_state_(struct MHD_Connection *connection, bool nodelay_state)
Declarations of send() wrappers.
internal shared structures
@ MHD_TLS_CONN_WR_CLOSING
@ MHD_TLS_CONN_TLS_FAILED
@ MHD_TLS_CONN_HANDSHAKING
memory pool; mostly used for efficient (de)allocation for each connection and bounding memory use for...
internal monotonic clock functions implementations
Methods for managing response objects.
enum MHD_tristate sk_nodelay
struct MHD_Daemon * daemon