|
pianod2
multisource multiuser scriptable networked music player
|
Football transport implementations for mBed TLS (formerly Polar SSL). More...
#include <config.h>#include <assert.h>#include <errno.h>#include "fb_public.h"#include "fb_transport.h"#include "fb_service.h"#include <sys/socket.h>#include <mbedtls/net.h>#include <mbedtls/ssl.h>#include <mbedtls/entropy.h>#include <mbedtls/ctr_drbg.h>#include <mbedtls/pem.h>#include <mbedtls/pk.h>#include <mbedtls/error.h>#include <mbedtls/debug.h>
Functions | |
| static void | mbedtls_debug (void *ctx, int level, const char *file, int line, const char *str) |
| static void | fb_mbedtls_error (struct fb_connection_t *connection, const char *func, int error) |
| static void | fb_mbedtls_config_error (const char *func, int error) |
| bool | fb_mbedtls_configure (const FB_TLS_CONFIG_FILENAMES *path) |
| bool | fb_mbedtls_init (FB_CONNECTION *connection) |
| ssize_t | fb_mbedtls_handshake (struct fb_connection_t *connection) |
| ssize_t | fb_mbedtls_buffering (struct fb_connection_t *connection) |
| ssize_t | fb_mbedtls_read (struct fb_connection_t *connection, char *data, ssize_t byte_count) |
| ssize_t | fb_mbedtls_write (struct fb_connection_t *connection, const char *data, ssize_t byte_count) |
| void | fb_mbedtls_done (FB_CONNECTION *connection) |
| void | fb_mbedtls_cleanup () |
Variables | |
| static bool | fb_tls_initialized |
| static mbedtls_x509_crt | tls_certificate |
| static mbedtls_pk_context | tls_public_key |
| static mbedtls_x509_crt | root_ca_certificate |
| static mbedtls_x509_crl | root_revokation_certificate |
| static mbedtls_entropy_context | entropy |
| static mbedtls_ctr_drbg_context | random_context |
| static mbedtls_ssl_config | server_config |
| const FB_TRANSPORT_FUNCS | fb_transport_encrypted |
Football transport implementations for mBed TLS (formerly Polar SSL).
| ssize_t fb_mbedtls_buffering | ( | struct fb_connection_t * | connection | ) |
Query number of bytes in TLS buffers. mbedtls doesn't seem to have a pending bytes function, or possibly I am unable to find it in their documentation. To simulate, we read one byte and buffer it, then tack it onto the front of the next read.
| void fb_mbedtls_cleanup | ( | ) |
|
static |

| bool fb_mbedtls_configure | ( | const FB_TLS_CONFIG_FILENAMES * | path | ) |
Load certificates and keys.

| void fb_mbedtls_done | ( | FB_CONNECTION * | connection | ) |
|
static |

| ssize_t fb_mbedtls_handshake | ( | struct fb_connection_t * | connection | ) |
Perform TLS handshaking on a new connection. Return incomplete, failure, or 0.

| bool fb_mbedtls_init | ( | FB_CONNECTION * | connection | ) |
Initialize the TLS stuff for a new connection.
| connection | The connection to initialize. |

| ssize_t fb_mbedtls_read | ( | struct fb_connection_t * | connection, |
| char * | data, | ||
| ssize_t | byte_count | ||
| ) |
Read data from a TLS connection using mBedTLS.

| ssize_t fb_mbedtls_write | ( | struct fb_connection_t * | connection, |
| const char * | data, | ||
| ssize_t | byte_count | ||
| ) |
Write data to a TLS connection using mBedTLS.

|
static |

|
static |
|
static |
| const FB_TRANSPORT_FUNCS fb_transport_encrypted |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |