GNU libmicrohttpd
0.9.59
|
Methods for managing SSL/TLS connections. This file is only compiled if ENABLE_HTTPS is set. More...
#include "internal.h"
#include "connection.h"
#include "connection_https.h"
#include "memorypool.h"
#include "response.h"
#include "mhd_mono_clock.h"
#include <gnutls/gnutls.h>
Go to the source code of this file.
Functions | |
static ssize_t | recv_tls_adapter (struct MHD_Connection *connection, void *other, size_t i) |
static ssize_t | send_tls_adapter (struct MHD_Connection *connection, const void *other, size_t i) |
bool | MHD_run_tls_handshake_ (struct MHD_Connection *connection) |
void | MHD_set_https_callbacks (struct MHD_Connection *connection) |
bool | MHD_tls_connection_shutdown (struct MHD_Connection *connection) |
Methods for managing SSL/TLS connections. This file is only compiled if ENABLE_HTTPS is set.
Definition in file connection_https.c.
bool MHD_run_tls_handshake_ | ( | struct MHD_Connection * | connection | ) |
Give gnuTLS chance to work on the TLS handshake.
connection | connection to handshake on |
Definition at line 148 of file connection_https.c.
References _, MHD_Connection::daemon, MHD_connection_close_(), MHD_REQUEST_TERMINATED_WITH_ERROR, MHD_TLS_CONN_CONNECTED, MHD_TLS_CONN_HANDSHAKING, MHD_TLS_CONN_INIT, MHD_TLS_CONN_TLS_FAILED, and MHD_update_last_activity_().
Referenced by MHD_connection_handle_read(), and MHD_connection_handle_write().
void MHD_set_https_callbacks | ( | struct MHD_Connection * | connection | ) |
Set connection callback function to be used through out the processing of this secure connection.
connection | which callbacks should be modified |
Definition at line 191 of file connection_https.c.
References MHD_Connection::recv_cls, recv_tls_adapter(), MHD_Connection::send_cls, and send_tls_adapter().
Referenced by internal_add_connection().
bool MHD_tls_connection_shutdown | ( | struct MHD_Connection * | connection | ) |
Initiate shutdown of TLS layer of connection.
connection | to use |
Definition at line 205 of file connection_https.c.
References MHD_TLS_CONN_TLS_FAILED, MHD_TLS_CONN_WR_CLOSED, and MHD_TLS_CONN_WR_CLOSING.
Referenced by MHD_connection_mark_closed_().
|
static |
Callback for receiving data from the socket.
connection | the MHD_Connection structure |
other | where to write received data to |
i | maximum size of other (in bytes) |
Definition at line 48 of file connection_https.c.
References MHD_EPOLL_STATE_READ_READY, MHD_ERR_AGAIN_, and MHD_ERR_NOTCONN_.
Referenced by MHD_set_https_callbacks().
|
static |
Callback for writing data to the socket.
connection | the MHD connection structure |
other | data to write |
i | number of bytes to write |
Definition at line 102 of file connection_https.c.
References MHD_EPOLL_STATE_WRITE_READY, MHD_ERR_AGAIN_, and MHD_ERR_NOTCONN_.
Referenced by MHD_set_https_callbacks().