OpenVPN
Data Structures | Typedefs | Functions
ssl_mbedtls.h File Reference
#include "syshead.h"
#include <mbedtls/ssl.h>
#include <mbedtls/x509_crt.h>
#include <mbedtls/version.h>
#include "mbedtls_compat.h"
Include dependency graph for ssl_mbedtls.h:

Go to the source code of this file.

Data Structures

struct  _buffer_entry
 
struct  endless_buffer
 
struct  bio_ctx
 
struct  external_context
 Context used by external_pkcs1_sign() More...
 
struct  tls_key_cache
 
struct  tls_root_ctx
 Structure that wraps the TLS context. More...
 
struct  key_state_ssl
 

Typedefs

typedef struct _buffer_entry buffer_entry
 
typedef bool(* external_sign_func) (void *sign_ctx, const void *src, size_t src_size, void *dst, size_t dst_size)
 External signing function prototype. More...
 

Functions

int tls_ctx_use_external_signing_func (struct tls_root_ctx *ctx, external_sign_func sign_func, void *sign_ctx)
 Call the supplied signing function to create a TLS signature during the TLS handshake. More...
 
static void tls_clear_error (void)
 

Typedef Documentation

◆ buffer_entry

typedef struct _buffer_entry buffer_entry

Definition at line 44 of file ssl_mbedtls.h.

◆ external_sign_func

typedef bool(* external_sign_func) (void *sign_ctx, const void *src, size_t src_size, void *dst, size_t dst_size)

External signing function prototype.

A function pointer to a function implementing this prototype is provided to tls_ctx_use_external_signing_func().

Parameters
sign_ctxThe context for the signing function.
srcThe data to be signed,
src_lenThe length of src, in bytes.
dstThe destination buffer for the signature.
dst_lenThe length of the destination buffer.
Returns
true if signing succeeded, false otherwise.

Definition at line 76 of file ssl_mbedtls.h.

Function Documentation

◆ tls_clear_error()

static void tls_clear_error ( void  )
inlinestatic

Definition at line 150 of file ssl_mbedtls.h.

◆ tls_ctx_use_external_signing_func()

int tls_ctx_use_external_signing_func ( struct tls_root_ctx ctx,
external_sign_func  sign_func,
void *  sign_ctx 
)

Call the supplied signing function to create a TLS signature during the TLS handshake.

Parameters
ctxTLS context to use.
sign_funcSigning function to call.
sign_ctxContext for the sign function.
Returns
0 if successful, 1 if an error occurred.