FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
tls_mbedtls.c File Reference
+ Include dependency graph for tls_mbedtls.c:

Go to the source code of this file.

Data Structures

struct  tls_ctx_mbedtls_
 
struct  mbedtls_main_
 

Macros

#define TLS_USE_OUR_MEM_FUNCS   0
 

Typedefs

typedef struct tls_ctx_mbedtls_ mbedtls_ctx_t
 
typedef struct mbedtls_main_ mbedtls_main_t
 

Functions

static u32 mbedtls_ctx_alloc (void)
 
static void mbedtls_ctx_free (tls_ctx_t *ctx)
 
static tls_ctx_tmbedtls_ctx_get (u32 ctx_index)
 
static tls_ctx_tmbedtls_ctx_get_w_thread (u32 ctx_index, u8 thread_index)
 
static int tls_init_ctr_seed_drbgs (void)
 
mbedtls_ctr_drbg_context * tls_get_ctr_drbg ()
 
static int tls_net_send (void *ctx_indexp, const unsigned char *buf, size_t len)
 
static int tls_net_recv (void *ctx_indexp, unsigned char *buf, size_t len)
 
static void mbedtls_debug (void *ctx, int level, const char *file, int line, const char *str)
 
static int mbedtls_ctx_init_client (tls_ctx_t *ctx)
 
static int mbedtls_start_listen (tls_ctx_t *lctx)
 
static int mbedtls_stop_listen (tls_ctx_t *lctx)
 
static int mbedtls_ctx_init_server (tls_ctx_t *ctx)
 
static int mbedtls_ctx_handshake_rx (tls_ctx_t *ctx)
 
static int mbedtls_ctx_write (tls_ctx_t *ctx, session_t *app_session, transport_send_params_t *sp)
 
static int mbedtls_ctx_read (tls_ctx_t *ctx, session_t *tls_session)
 
static u8 mbedtls_handshake_is_over (tls_ctx_t *ctx)
 
static int mbedtls_transport_close (tls_ctx_t *ctx)
 
static int mbedtls_app_close (tls_ctx_t *ctx)
 
int tls_init_mem (void)
 
static int tls_init_ctr_drbgs_and_entropy (u32 num_threads)
 
int tls_init_ca_chain (void)
 
static clib_error_ttls_mbedtls_init (vlib_main_t *vm)
 
 VLIB_PLUGIN_REGISTER ()
 

Variables

static mbedtls_main_t mbedtls_main
 
const static tls_engine_vft_t mbedtls_engine
 

Macro Definition Documentation

◆ TLS_USE_OUR_MEM_FUNCS

#define TLS_USE_OUR_MEM_FUNCS   0

Definition at line 26 of file tls_mbedtls.c.

Typedef Documentation

◆ mbedtls_ctx_t

◆ mbedtls_main_t

typedef struct mbedtls_main_ mbedtls_main_t

Function Documentation

◆ mbedtls_app_close()

static int mbedtls_app_close ( tls_ctx_t ctx)
static

Definition at line 553 of file tls_mbedtls.c.

+ Here is the call graph for this function:

◆ mbedtls_ctx_alloc()

static u32 mbedtls_ctx_alloc ( void  )
static

Definition at line 71 of file tls_mbedtls.c.

+ Here is the call graph for this function:

◆ mbedtls_ctx_free()

static void mbedtls_ctx_free ( tls_ctx_t ctx)
static

Definition at line 89 of file tls_mbedtls.c.

+ Here is the caller graph for this function:

◆ mbedtls_ctx_get()

static tls_ctx_t* mbedtls_ctx_get ( u32  ctx_index)
static

Definition at line 109 of file tls_mbedtls.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mbedtls_ctx_get_w_thread()

static tls_ctx_t* mbedtls_ctx_get_w_thread ( u32  ctx_index,
u8  thread_index 
)
static

Definition at line 118 of file tls_mbedtls.c.

◆ mbedtls_ctx_handshake_rx()

static int mbedtls_ctx_handshake_rx ( tls_ctx_t ctx)
static

Definition at line 381 of file tls_mbedtls.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mbedtls_ctx_init_client()

static int mbedtls_ctx_init_client ( tls_ctx_t ctx)
static

Definition at line 202 of file tls_mbedtls.c.

+ Here is the call graph for this function:

◆ mbedtls_ctx_init_server()

static int mbedtls_ctx_init_server ( tls_ctx_t ctx)
static

Definition at line 275 of file tls_mbedtls.c.

+ Here is the call graph for this function:

◆ mbedtls_ctx_read()

static int mbedtls_ctx_read ( tls_ctx_t ctx,
session_t tls_session 
)
static

Definition at line 482 of file tls_mbedtls.c.

+ Here is the call graph for this function:

◆ mbedtls_ctx_write()

static int mbedtls_ctx_write ( tls_ctx_t ctx,
session_t app_session,
transport_send_params_t sp 
)
static

Definition at line 434 of file tls_mbedtls.c.

+ Here is the call graph for this function:

◆ mbedtls_debug()

static void mbedtls_debug ( void *  ctx,
int  level,
const char *  file,
int  line,
const char *  str 
)
static

Definition at line 193 of file tls_mbedtls.c.

+ Here is the caller graph for this function:

◆ mbedtls_handshake_is_over()

static u8 mbedtls_handshake_is_over ( tls_ctx_t ctx)
static

Definition at line 534 of file tls_mbedtls.c.

+ Here is the caller graph for this function:

◆ mbedtls_start_listen()

static int mbedtls_start_listen ( tls_ctx_t lctx)
static

Definition at line 263 of file tls_mbedtls.c.

◆ mbedtls_stop_listen()

static int mbedtls_stop_listen ( tls_ctx_t lctx)
static

Definition at line 269 of file tls_mbedtls.c.

◆ mbedtls_transport_close()

static int mbedtls_transport_close ( tls_ctx_t ctx)
static

Definition at line 541 of file tls_mbedtls.c.

+ Here is the call graph for this function:

◆ tls_get_ctr_drbg()

mbedtls_ctr_drbg_context* tls_get_ctr_drbg ( )

Definition at line 151 of file tls_mbedtls.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tls_init_ca_chain()

int tls_init_ca_chain ( void  )

Definition at line 601 of file tls_mbedtls.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tls_init_ctr_drbgs_and_entropy()

static int tls_init_ctr_drbgs_and_entropy ( u32  num_threads)
static

Definition at line 587 of file tls_mbedtls.c.

+ Here is the caller graph for this function:

◆ tls_init_ctr_seed_drbgs()

static int tls_init_ctr_seed_drbgs ( void  )
static

Definition at line 126 of file tls_mbedtls.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tls_init_mem()

int tls_init_mem ( void  )

Definition at line 578 of file tls_mbedtls.c.

+ Here is the caller graph for this function:

◆ tls_mbedtls_init()

static clib_error_t* tls_mbedtls_init ( vlib_main_t vm)
static

Definition at line 634 of file tls_mbedtls.c.

+ Here is the call graph for this function:

◆ tls_net_recv()

static int tls_net_recv ( void *  ctx_indexp,
unsigned char *  buf,
size_t  len 
)
static

Definition at line 178 of file tls_mbedtls.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tls_net_send()

static int tls_net_send ( void *  ctx_indexp,
const unsigned char *  buf,
size_t  len 
)
static

Definition at line 160 of file tls_mbedtls.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ VLIB_PLUGIN_REGISTER()

VLIB_PLUGIN_REGISTER ( )

Variable Documentation

◆ mbedtls_engine

const static tls_engine_vft_t mbedtls_engine
static
Initial value:
= {
.ctx_alloc = mbedtls_ctx_alloc,
.ctx_free = mbedtls_ctx_free,
.ctx_get = mbedtls_ctx_get,
.ctx_get_w_thread = mbedtls_ctx_get_w_thread,
.ctx_init_server = mbedtls_ctx_init_server,
.ctx_init_client = mbedtls_ctx_init_client,
.ctx_write = mbedtls_ctx_write,
.ctx_read = mbedtls_ctx_read,
.ctx_handshake_is_over = mbedtls_handshake_is_over,
.ctx_start_listen = mbedtls_start_listen,
.ctx_stop_listen = mbedtls_stop_listen,
.ctx_transport_close = mbedtls_transport_close,
.ctx_app_close = mbedtls_app_close,
}

Definition at line 561 of file tls_mbedtls.c.

◆ mbedtls_main

mbedtls_main_t mbedtls_main
static

Definition at line 48 of file tls_mbedtls.c.

mbedtls_ctx_init_client
static int mbedtls_ctx_init_client(tls_ctx_t *ctx)
Definition: tls_mbedtls.c:202
mbedtls_ctx_read
static int mbedtls_ctx_read(tls_ctx_t *ctx, session_t *tls_session)
Definition: tls_mbedtls.c:482
mbedtls_ctx_write
static int mbedtls_ctx_write(tls_ctx_t *ctx, session_t *app_session, transport_send_params_t *sp)
Definition: tls_mbedtls.c:434
mbedtls_ctx_alloc
static u32 mbedtls_ctx_alloc(void)
Definition: tls_mbedtls.c:71
mbedtls_ctx_get
static tls_ctx_t * mbedtls_ctx_get(u32 ctx_index)
Definition: tls_mbedtls.c:109
mbedtls_handshake_is_over
static u8 mbedtls_handshake_is_over(tls_ctx_t *ctx)
Definition: tls_mbedtls.c:534
mbedtls_ctx_free
static void mbedtls_ctx_free(tls_ctx_t *ctx)
Definition: tls_mbedtls.c:89
mbedtls_ctx_get_w_thread
static tls_ctx_t * mbedtls_ctx_get_w_thread(u32 ctx_index, u8 thread_index)
Definition: tls_mbedtls.c:118
mbedtls_app_close
static int mbedtls_app_close(tls_ctx_t *ctx)
Definition: tls_mbedtls.c:553
mbedtls_ctx_init_server
static int mbedtls_ctx_init_server(tls_ctx_t *ctx)
Definition: tls_mbedtls.c:275
mbedtls_stop_listen
static int mbedtls_stop_listen(tls_ctx_t *lctx)
Definition: tls_mbedtls.c:269
mbedtls_transport_close
static int mbedtls_transport_close(tls_ctx_t *ctx)
Definition: tls_mbedtls.c:541
mbedtls_start_listen
static int mbedtls_start_listen(tls_ctx_t *lctx)
Definition: tls_mbedtls.c:263