Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

TLS layer

This file contains function prototypes for a TLS layer. More...

Functions

struct altcp_tls_config * altcp_tls_create_config_server_privkey_cert (const u8_t *privkey, size_t privkey_len, const u8_t *privkey_pass, size_t privkey_pass_len, const u8_t *cert, size_t cert_len)
 Create an ALTCP_TLS server configuration handle.
struct altcp_tls_config * altcp_tls_create_config_client (const u8_t *cert, size_t cert_len)
 Create an ALTCP_TLS client configuration handle.
struct altcp_tls_config * altcp_tls_create_config_client_2wayauth (const u8_t *ca, size_t ca_len, const u8_t *privkey, size_t privkey_len, const u8_t *privkey_pass, size_t privkey_pass_len, const u8_t *cert, size_t cert_len)
 Create an ALTCP_TLS client configuration handle with two-way server/client authentication.
void altcp_tls_free_config (struct altcp_tls_config *conf)
 Free an ALTCP_TLS configuration handle.
struct altcp_pcb * altcp_tls_wrap (struct altcp_tls_config *config, struct altcp_pcb *inner_pcb)
 Create new ALTCP_TLS layer wrapping an existing pcb as inner connection (e.g.
struct altcp_pcb * altcp_tls_new (struct altcp_tls_config *config, u8_t ip_type)
 Create new ALTCP_TLS pcb and its inner tcp pcb.
struct altcp_pcb * altcp_tls_alloc (void *arg, u8_t ip_type)
 Create new ALTCP_TLS layer pcb and its inner tcp pcb.
void * altcp_tls_context (struct altcp_pcb *conn)
 Return pointer to internal TLS context so application can tweak it.

Detailed Description

This file contains function prototypes for a TLS layer.

A port to ARM mbedtls is provided in the apps/ tree (LWIP_ALTCP_TLS_MBEDTLS option).


Function Documentation

struct altcp_pcb* altcp_tls_alloc ( void *  arg,
u8_t  ip_type 
) [read]

Create new ALTCP_TLS layer pcb and its inner tcp pcb.

Same as altcp_tls_new but this allocator function fits to altcp_allocator_t / altcp_new.
'arg' must contain a struct altcp_tls_config *.

Definition at line 80 of file lwip_altcp_alloc.c.

void* altcp_tls_context ( struct altcp_pcb *  conn )

Return pointer to internal TLS context so application can tweak it.

Real type depends on port (e.g. mbedtls)

Definition at line 630 of file altcp_tls_mbedtls.c.

struct altcp_tls_config* altcp_tls_create_config_client ( const u8_t *  cert,
size_t  cert_len 
) [read]

Create an ALTCP_TLS client configuration handle.

Definition at line 828 of file altcp_tls_mbedtls.c.

struct altcp_tls_config* altcp_tls_create_config_client_2wayauth ( const u8_t *  ca,
size_t  ca_len,
const u8_t *  privkey,
size_t  privkey_len,
const u8_t *  privkey_pass,
size_t  privkey_pass_len,
const u8_t *  cert,
size_t  cert_len 
) [read]

Create an ALTCP_TLS client configuration handle with two-way server/client authentication.

Definition at line 834 of file altcp_tls_mbedtls.c.

struct altcp_tls_config* altcp_tls_create_config_server_privkey_cert ( const u8_t *  privkey,
size_t  privkey_len,
const u8_t *  privkey_pass,
size_t  privkey_pass_len,
const u8_t *  cert,
size_t  cert_len 
) [read]

Create an ALTCP_TLS server configuration handle.

Definition at line 755 of file altcp_tls_mbedtls.c.

void altcp_tls_free_config ( struct altcp_tls_config *  conf )

Free an ALTCP_TLS configuration handle.

Definition at line 879 of file altcp_tls_mbedtls.c.

struct altcp_pcb* altcp_tls_new ( struct altcp_tls_config *  config,
u8_t  ip_type 
) [read]

Create new ALTCP_TLS pcb and its inner tcp pcb.

Definition at line 61 of file lwip_altcp_alloc.c.

struct altcp_pcb* altcp_tls_wrap ( struct altcp_tls_config *  config,
struct altcp_pcb *  inner_pcb 
) [read]

Create new ALTCP_TLS layer wrapping an existing pcb as inner connection (e.g.

TLS over TCP)

Definition at line 613 of file altcp_tls_mbedtls.c.