FD.io VPP  v19.04.1-1-ge4a0f9f
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)
 
static int mbedtls_ctx_read (tls_ctx_t *ctx, session_t *tls_session)
 
static u8 mbedtls_handshake_is_over (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
 
static const tls_engine_vft_t mbedtls_engine
 

Macro Definition Documentation

#define TLS_USE_OUR_MEM_FUNCS   0

Definition at line 26 of file tls_mbedtls.c.

Typedef Documentation

typedef struct mbedtls_main_ mbedtls_main_t

Function Documentation

static u32 mbedtls_ctx_alloc ( void  )
static

Definition at line 71 of file tls_mbedtls.c.

+ Here is the call graph for this function:

static void mbedtls_ctx_free ( tls_ctx_t ctx)
static

Definition at line 89 of file tls_mbedtls.c.

static tls_ctx_t* mbedtls_ctx_get ( u32  ctx_index)
static

Definition at line 108 of file tls_mbedtls.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 117 of file tls_mbedtls.c.

static int mbedtls_ctx_handshake_rx ( tls_ctx_t ctx)
static

Definition at line 382 of file tls_mbedtls.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int mbedtls_ctx_init_client ( tls_ctx_t ctx)
static

Definition at line 201 of file tls_mbedtls.c.

+ Here is the call graph for this function:

static int mbedtls_ctx_init_server ( tls_ctx_t ctx)
static

Definition at line 274 of file tls_mbedtls.c.

+ Here is the call graph for this function:

static int mbedtls_ctx_read ( tls_ctx_t ctx,
session_t tls_session 
)
static

Definition at line 481 of file tls_mbedtls.c.

+ Here is the call graph for this function:

static int mbedtls_ctx_write ( tls_ctx_t ctx,
session_t app_session 
)
static

Definition at line 435 of file tls_mbedtls.c.

+ Here is the call graph for this function:

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

Definition at line 192 of file tls_mbedtls.c.

+ Here is the caller graph for this function:

static u8 mbedtls_handshake_is_over ( tls_ctx_t ctx)
static

Definition at line 533 of file tls_mbedtls.c.

static int mbedtls_start_listen ( tls_ctx_t lctx)
static

Definition at line 262 of file tls_mbedtls.c.

static int mbedtls_stop_listen ( tls_ctx_t lctx)
static

Definition at line 268 of file tls_mbedtls.c.

mbedtls_ctr_drbg_context* tls_get_ctr_drbg ( )

Definition at line 150 of file tls_mbedtls.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int tls_init_ca_chain ( void  )

Definition at line 577 of file tls_mbedtls.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int tls_init_ctr_drbgs_and_entropy ( u32  num_threads)
static

Definition at line 563 of file tls_mbedtls.c.

+ Here is the caller graph for this function:

static int tls_init_ctr_seed_drbgs ( void  )
static

Definition at line 125 of file tls_mbedtls.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int tls_init_mem ( void  )

Definition at line 554 of file tls_mbedtls.c.

+ Here is the caller graph for this function:

static clib_error_t* tls_mbedtls_init ( vlib_main_t vm)
static

Definition at line 610 of file tls_mbedtls.c.

+ Here is the call graph for this function:

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

Definition at line 177 of file tls_mbedtls.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 159 of file tls_mbedtls.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VLIB_PLUGIN_REGISTER ( )

+ Here is the caller graph for this function:

Variable Documentation

const 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,
}
static void mbedtls_ctx_free(tls_ctx_t *ctx)
Definition: tls_mbedtls.c:89
static u32 mbedtls_ctx_alloc(void)
Definition: tls_mbedtls.c:71
static tls_ctx_t * mbedtls_ctx_get_w_thread(u32 ctx_index, u8 thread_index)
Definition: tls_mbedtls.c:117
static u8 mbedtls_handshake_is_over(tls_ctx_t *ctx)
Definition: tls_mbedtls.c:533
static int mbedtls_start_listen(tls_ctx_t *lctx)
Definition: tls_mbedtls.c:262
static int mbedtls_ctx_write(tls_ctx_t *ctx, session_t *app_session)
Definition: tls_mbedtls.c:435
static int mbedtls_ctx_init_client(tls_ctx_t *ctx)
Definition: tls_mbedtls.c:201
static int mbedtls_ctx_read(tls_ctx_t *ctx, session_t *tls_session)
Definition: tls_mbedtls.c:481
static int mbedtls_ctx_init_server(tls_ctx_t *ctx)
Definition: tls_mbedtls.c:274
static int mbedtls_stop_listen(tls_ctx_t *lctx)
Definition: tls_mbedtls.c:268
static tls_ctx_t * mbedtls_ctx_get(u32 ctx_index)
Definition: tls_mbedtls.c:108

Definition at line 539 of file tls_mbedtls.c.

mbedtls_main_t mbedtls_main
static

Definition at line 48 of file tls_mbedtls.c.