|
c-icap-doc
0.1
|
TLS/SSL related API. More...
Data Structures | |
| struct | ci_tls_client_options |
| Stores basic parameters for connecting to the remote TLS server. More... | |
Typedefs | |
|
typedef struct ci_tls_client_options | ci_tls_client_options_t |
| Stores basic parameters for connecting to the remote TLS server. | |
Functions | |
| void | ci_tls_init () |
| Initializes c-icap tls subsystem. More... | |
| void | ci_tls_cleanup () |
| Deinitializes c-icap tls subsystem. More... | |
| SSL_CTX * | ci_tls_create_context (ci_tls_client_options_t *opts) |
| Create a context based on given opts. More... | |
| ci_connection_t * | ci_tls_connect (const char *servername, int port, int proto, SSL_CTX *ctx, int timeout) |
| Initializes and establishes a connection to a server. More... | |
| int | ci_tls_connect_nonblock (ci_connection_t *connection, const char *servername, int port, int proto, SSL_CTX *ctx) |
| The non-blocking version of ci_tls_connect function. More... | |
| int | ci_connection_should_read_tls (ci_connection_t *connection) |
| The TLS subsystem wants to read data from the connection. More... | |
| int | ci_connection_should_write_tls (ci_connection_t *connection) |
| The TLS subsystem wants to write data to the connection. More... | |
| int | ci_connection_read_pending_tls (ci_connection_t *conn) |
| There are pending bytes to read from TLS connection. More... | |
| int | ci_connection_write_pending_tls (ci_connection_t *conn) |
| There are pending bytes to write to TLS connection. More... | |
TLS/SSL related API.
| int ci_connection_read_pending_tls | ( | ci_connection_t * | conn | ) |
There are pending bytes to read from TLS connection.
| int ci_connection_should_read_tls | ( | ci_connection_t * | connection | ) |
The TLS subsystem wants to read data from the connection.
| int ci_connection_should_write_tls | ( | ci_connection_t * | connection | ) |
The TLS subsystem wants to write data to the connection.
| int ci_connection_write_pending_tls | ( | ci_connection_t * | conn | ) |
There are pending bytes to write to TLS connection.
| void ci_tls_cleanup | ( | ) |
Deinitializes c-icap tls subsystem.
Normally called on shutdown to clean-up.
| ci_connection_t* ci_tls_connect | ( | const char * | servername, |
| int | port, | ||
| int | proto, | ||
| SSL_CTX * | ctx, | ||
| int | timeout | ||
| ) |
Initializes and establishes a connection to a server.
| servername | The ip or dns name of the server |
| p | The port number to use |
| proto | One of AF_INET, AF_INET6 |
| ctx | The context object to use |
| int ci_tls_connect_nonblock | ( | ci_connection_t * | connection, |
| const char * | servername, | ||
| int | port, | ||
| int | proto, | ||
| SSL_CTX * | ctx | ||
| ) |
The non-blocking version of ci_tls_connect function.
To establish a connection required more than one calls to ci_tls_connect_nonblock. The user should monitor the connection->fd file descriptor for events in order to call again ci_tls_connect_nonblock. If it is used with a custom monitor of file descriptors event, it should be used with ci_connection_should_read_tls/ci_connection_should_write_tls functions. In this case it should be used as follows:
| SSL_CTX* ci_tls_create_context | ( | ci_tls_client_options_t * | opts | ) |
Create a context based on given opts.
A context can be used to open more than one connections to a TLS server.
| void ci_tls_init | ( | ) |
Initializes c-icap tls subsystem.
Normally called on programs startup.
1.8.5