Functions | |
| air_err_t | air_socket_alloc (ualloc_t *ua, char *host, int port, air_socket_t **sock) |
| Initializes a TCP socket context. More... | |
| air_err_t | air_socket_free (air_socket_t *sock) |
| Frees a TCP socket context. If the socket is open, it will be closed prior to being free()-ed. More... | |
| air_err_t | air_socket_isopen (air_socket_t *sock) |
| Checks whether the TCP socket is open. More... | |
| air_err_t | air_socket_open (air_socket_t *sock) |
| Opens a TCP socket. More... | |
| air_err_t | air_socket_close (air_socket_t *sock) |
| Closes a TCP socket. More... | |
| air_err_t | air_socket_send (air_socket_t *sock, air_xbuf_t *in_data) |
| Sends a buffer over an established TCP connection. More... | |
| air_err_t | air_socket_recv (air_socket_t *sock, int out_data_max, air_xbuf_t **out_data) |
| Receive a buffer over an established TCP connection. More... | |
| air_err_t | air_ssl_init () |
| Initializes the OpenSSL library. More... | |
| air_err_t | air_ssl_alloc (ualloc_t *ua, air_socket_t *sock, air_ssl_socket_t **ssl) |
| air_err_t | air_ssl_free (air_ssl_socket_t *ssl) |
| Deallocates an SSL/TLS socket context. More... | |
| air_err_t | air_ssl_add_peer (air_ssl_socket_t *ssl, X509 *server_cert) |
| Adds an X.509 peer certificate against which to validate when SSL/TLS mutual authentication is used. More... | |
| air_err_t | air_ssl_add_issuer (air_ssl_socket_t *ssl, X509 *issuer_cert) |
| air_err_t | air_ssl_set_credentials (air_ssl_socket_t *ssl, X509 *cert, EVP_PKEY *privkey) |
| air_err_t | air_ssl_peer_validate (air_ssl_socket_t *ssl) |
| air_err_t | air_ssl_isopen (air_ssl_socket_t *ssl) |
| Checks whether a ssl/tls context has an open socket. More... | |
| air_err_t | air_ssl_open (air_ssl_socket_t *ssl, int peer_auth) |
| Opens an SSL/TLS socket. More... | |
| air_err_t | air_ssl_close (air_ssl_socket_t *ssl) |
| air_err_t | air_ssl_send (air_ssl_socket_t *ssl, air_xbuf_t *in_data) |
| Sends a buffer over an established SSL/TLS connection. More... | |
| air_err_t | air_ssl_recv (air_ssl_socket_t *ssl, int out_data_max, air_xbuf_t **out_data) |
| Receive a buffer over an established SSL/TLS connection. More... | |
| air_err_t | air_ssl_recv2 (air_ssl_socket_t *ssl, air_xbuf_t *buf) |
| alternate form of air_ssl_recv() that uses an xbuf in-place. More... | |
| air_err_t | air_ssl_get_last_ierr_string (air_ssl_socket_t *ssl, air_xbuf_t **err_string) |
| air_openssl_err_t | air_ssl_get_last_ierr () |
| Returns the last internal error (of OpenSSL). More... | |
| air_err_t | air_crypto_privkey_fload (char *key_fname, EVP_PKEY **privkey) |
| Loads a PEM encoded RSA key from disk. More... | |
| air_err_t | air_crypto_crt_fload (char *crt_fname, X509 **cert) |
| Loads a PEM encoded X.509 certificate from disk. More... | |
| air_err_t | air_http_make_request (ualloc_t *ua, air_xbuf_t *in_data, char *script, air_xbuf_t **out_data) |
| Accepts a buffer and formats it into an HTTP POST request. More... | |
| air_err_t | air_http_parse_reply (air_xbuf_t *in_data, int *http_code, air_xbuf_t **out_data) |
Ability to send arbitrary buffers over a TCP socket or SSL/TLS, either raw or formatted as an HTTP POST request.
|
||||||||||||||||||||
|
Initializes a TCP socket context. **********************************************************************
|
|
|
Frees a TCP socket context. If the socket is open, it will be closed prior to being free()-ed. **********************************************************************
|
|
|
Checks whether the TCP socket is open. **********************************************************************
|
|
|
Opens a TCP socket. **********************************************************************
|
|
|
Closes a TCP socket. **********************************************************************
|
|
||||||||||||
|
Sends a buffer over an established TCP connection. **********************************************************************
This is a blocking operation.
|
|
||||||||||||||||
|
Receive a buffer over an established TCP connection. **********************************************************************
This is a blocking operation.
|
|
|
Initializes the OpenSSL library. **********************************************************************
This function should be called prior to using any other air_ssl_*() or air_crypto_*() routines
|
|
|
Deallocates an SSL/TLS socket context. **********************************************************************
Note: The air_socket_t associated with this air_ssl_t is also deallocated
|
|
||||||||||||
|
Adds an X.509 peer certificate against which to validate when SSL/TLS mutual authentication is used. **********************************************************************
|
|
|
air_ssl_cert_validate(air_ssl_socket_t *ssl)
There are a number of checks that should be performed:
|
|
|
Checks whether a ssl/tls context has an open socket. **********************************************************************
|
|
||||||||||||
|
Opens an SSL/TLS socket. **********************************************************************
|
|
||||||||||||
|
Sends a buffer over an established SSL/TLS connection. **********************************************************************
This is a blocking operation.
|
|
||||||||||||||||
|
Receive a buffer over an established SSL/TLS connection. **********************************************************************
This is a blocking operation.
|
|
||||||||||||
|
alternate form of air_ssl_recv() that uses an xbuf in-place.
|
|
|
Returns the last internal error (of OpenSSL). **********************************************************************
This is not thread safe, since the call to ERR_get_error() is safe.
|
|
||||||||||||
|
Loads a PEM encoded RSA key from disk. **********************************************************************
|
|
||||||||||||
|
Loads a PEM encoded X.509 certificate from disk. **********************************************************************
|
|
||||||||||||||||||||
|
Accepts a buffer and formats it into an HTTP POST request. **********************************************************************
|