FD.io VPP  v18.07-rc0-415-g6c78436
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_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, stream_session_t *app_session)
 
static int mbedtls_ctx_read (tls_ctx_t *ctx, stream_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 365 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 262 of file tls_mbedtls.c.

+ Here is the call graph for this function:

static int mbedtls_ctx_read ( tls_ctx_t ctx,
stream_session_t tls_session 
)
static

Definition at line 465 of file tls_mbedtls.c.

+ Here is the call graph for this function:

static int mbedtls_ctx_write ( tls_ctx_t ctx,
stream_session_t app_session 
)
static

Definition at line 418 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 517 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 559 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 545 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 536 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 592 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,
}
static int mbedtls_ctx_write(tls_ctx_t *ctx, stream_session_t *app_session)
Definition: tls_mbedtls.c:418
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:517
static int mbedtls_ctx_read(tls_ctx_t *ctx, stream_session_t *tls_session)
Definition: tls_mbedtls.c:465
static int mbedtls_ctx_init_client(tls_ctx_t *ctx)
Definition: tls_mbedtls.c:201
static int mbedtls_ctx_init_server(tls_ctx_t *ctx)
Definition: tls_mbedtls.c:262
static tls_ctx_t * mbedtls_ctx_get(u32 ctx_index)
Definition: tls_mbedtls.c:108

Definition at line 523 of file tls_mbedtls.c.

mbedtls_main_t mbedtls_main
static

Definition at line 48 of file tls_mbedtls.c.