OpenVPN
Typedefs | Enumerations | Functions
mbedtls_compat.h File Reference
#include "syshead.h"
#include "errlevel.h"
#include <mbedtls/cipher.h>
#include <mbedtls/ctr_drbg.h>
#include <mbedtls/dhm.h>
#include <mbedtls/ecp.h>
#include <mbedtls/md.h>
#include <mbedtls/pem.h>
#include <mbedtls/pk.h>
#include <mbedtls/ssl.h>
#include <mbedtls/version.h>
#include <mbedtls/x509_crt.h>
Include dependency graph for mbedtls_compat.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef mbedtls_ecp_group_id mbedtls_compat_group_id
 

Enumerations

enum  mbedtls_ssl_protocol_version { MBEDTLS_SSL_VERSION_UNKNOWN, MBEDTLS_SSL_VERSION_TLS1_2 = 0x0303, MBEDTLS_SSL_VERSION_TLS1_3 = 0x0304 }
 

Functions

static void mbedtls_compat_psa_crypto_init (void)
 
static mbedtls_compat_group_id mbedtls_compat_get_group_id (const mbedtls_ecp_curve_info *curve_info)
 
static int mbedtls_compat_ctr_drbg_update (mbedtls_ctr_drbg_context *ctx, const unsigned char *additional, size_t add_len)
 
static int mbedtls_compat_pk_check_pair (const mbedtls_pk_context *pub, const mbedtls_pk_context *prv, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng)
 
static int mbedtls_compat_pk_parse_key (mbedtls_pk_context *ctx, const unsigned char *key, size_t keylen, const unsigned char *pwd, size_t pwdlen, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng)
 
static int mbedtls_compat_pk_parse_keyfile (mbedtls_pk_context *ctx, const char *path, const char *password, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng)
 
static void mbedtls_ssl_conf_min_tls_version (mbedtls_ssl_config *conf, mbedtls_ssl_protocol_version tls_version)
 
static void mbedtls_ssl_conf_max_tls_version (mbedtls_ssl_config *conf, mbedtls_ssl_protocol_version tls_version)
 
static void mbedtls_ssl_conf_groups (mbedtls_ssl_config *conf, mbedtls_compat_group_id *groups)
 
static size_t mbedtls_cipher_info_get_block_size (const mbedtls_cipher_info_t *cipher)
 
static size_t mbedtls_cipher_info_get_iv_size (const mbedtls_cipher_info_t *cipher)
 
static size_t mbedtls_cipher_info_get_key_bitlen (const mbedtls_cipher_info_t *cipher)
 
static mbedtls_cipher_mode_t mbedtls_cipher_info_get_mode (const mbedtls_cipher_info_t *cipher)
 
static const char * mbedtls_cipher_info_get_name (const mbedtls_cipher_info_t *cipher)
 
static mbedtls_cipher_type_t mbedtls_cipher_info_get_type (const mbedtls_cipher_info_t *cipher)
 
static size_t mbedtls_dhm_get_bitlen (const mbedtls_dhm_context *ctx)
 
static const mbedtls_md_info_t * mbedtls_md_info_from_ctx (const mbedtls_md_context_t *ctx)
 
static const unsigned char * mbedtls_pem_get_buffer (const mbedtls_pem_context *ctx, size_t *buf_size)
 
static int mbedtls_x509_crt_has_ext_type (const mbedtls_x509_crt *ctx, int ext_type)
 

Typedef Documentation

◆ mbedtls_compat_group_id

typedef mbedtls_ecp_group_id mbedtls_compat_group_id

Definition at line 58 of file mbedtls_compat.h.

Enumeration Type Documentation

◆ mbedtls_ssl_protocol_version

Enumerator
MBEDTLS_SSL_VERSION_UNKNOWN 

Context not in use or version not yet negotiated.

MBEDTLS_SSL_VERSION_TLS1_2 

(D)TLS 1.2

MBEDTLS_SSL_VERSION_TLS1_3 

(D)TLS 1.3

Definition at line 144 of file mbedtls_compat.h.

Function Documentation

◆ mbedtls_cipher_info_get_block_size()

static size_t mbedtls_cipher_info_get_block_size ( const mbedtls_cipher_info_t *  cipher)
inlinestatic

Definition at line 173 of file mbedtls_compat.h.

◆ mbedtls_cipher_info_get_iv_size()

static size_t mbedtls_cipher_info_get_iv_size ( const mbedtls_cipher_info_t *  cipher)
inlinestatic

Definition at line 179 of file mbedtls_compat.h.

◆ mbedtls_cipher_info_get_key_bitlen()

static size_t mbedtls_cipher_info_get_key_bitlen ( const mbedtls_cipher_info_t *  cipher)
inlinestatic

Definition at line 185 of file mbedtls_compat.h.

◆ mbedtls_cipher_info_get_mode()

static mbedtls_cipher_mode_t mbedtls_cipher_info_get_mode ( const mbedtls_cipher_info_t *  cipher)
inlinestatic

Definition at line 191 of file mbedtls_compat.h.

◆ mbedtls_cipher_info_get_name()

static const char* mbedtls_cipher_info_get_name ( const mbedtls_cipher_info_t *  cipher)
inlinestatic

Definition at line 197 of file mbedtls_compat.h.

◆ mbedtls_cipher_info_get_type()

static mbedtls_cipher_type_t mbedtls_cipher_info_get_type ( const mbedtls_cipher_info_t *  cipher)
inlinestatic

Definition at line 203 of file mbedtls_compat.h.

◆ mbedtls_compat_ctr_drbg_update()

static int mbedtls_compat_ctr_drbg_update ( mbedtls_ctr_drbg_context *  ctx,
const unsigned char *  additional,
size_t  add_len 
)
inlinestatic

Definition at line 93 of file mbedtls_compat.h.

◆ mbedtls_compat_get_group_id()

static mbedtls_compat_group_id mbedtls_compat_get_group_id ( const mbedtls_ecp_curve_info *  curve_info)
inlinestatic

Definition at line 75 of file mbedtls_compat.h.

◆ mbedtls_compat_pk_check_pair()

static int mbedtls_compat_pk_check_pair ( const mbedtls_pk_context *  pub,
const mbedtls_pk_context *  prv,
int(*)(void *, unsigned char *, size_t)  f_rng,
void *  p_rng 
)
inlinestatic

Definition at line 108 of file mbedtls_compat.h.

◆ mbedtls_compat_pk_parse_key()

static int mbedtls_compat_pk_parse_key ( mbedtls_pk_context *  ctx,
const unsigned char *  key,
size_t  keylen,
const unsigned char *  pwd,
size_t  pwdlen,
int(*)(void *, unsigned char *, size_t)  f_rng,
void *  p_rng 
)
inlinestatic

Definition at line 119 of file mbedtls_compat.h.

◆ mbedtls_compat_pk_parse_keyfile()

static int mbedtls_compat_pk_parse_keyfile ( mbedtls_pk_context *  ctx,
const char *  path,
const char *  password,
int(*)(void *, unsigned char *, size_t)  f_rng,
void *  p_rng 
)
inlinestatic

Definition at line 132 of file mbedtls_compat.h.

◆ mbedtls_compat_psa_crypto_init()

static void mbedtls_compat_psa_crypto_init ( void  )
inlinestatic

Definition at line 62 of file mbedtls_compat.h.

References M_FATAL, and msg.

◆ mbedtls_dhm_get_bitlen()

static size_t mbedtls_dhm_get_bitlen ( const mbedtls_dhm_context *  ctx)
inlinestatic

Definition at line 209 of file mbedtls_compat.h.

◆ mbedtls_md_info_from_ctx()

static const mbedtls_md_info_t* mbedtls_md_info_from_ctx ( const mbedtls_md_context_t *  ctx)
inlinestatic

Definition at line 215 of file mbedtls_compat.h.

◆ mbedtls_pem_get_buffer()

static const unsigned char* mbedtls_pem_get_buffer ( const mbedtls_pem_context *  ctx,
size_t *  buf_size 
)
inlinestatic

Definition at line 221 of file mbedtls_compat.h.

◆ mbedtls_ssl_conf_groups()

static void mbedtls_ssl_conf_groups ( mbedtls_ssl_config *  conf,
mbedtls_compat_group_id groups 
)
inlinestatic

Definition at line 167 of file mbedtls_compat.h.

◆ mbedtls_ssl_conf_max_tls_version()

static void mbedtls_ssl_conf_max_tls_version ( mbedtls_ssl_config *  conf,
mbedtls_ssl_protocol_version  tls_version 
)
inlinestatic

Definition at line 159 of file mbedtls_compat.h.

◆ mbedtls_ssl_conf_min_tls_version()

static void mbedtls_ssl_conf_min_tls_version ( mbedtls_ssl_config *  conf,
mbedtls_ssl_protocol_version  tls_version 
)
inlinestatic

Definition at line 151 of file mbedtls_compat.h.

◆ mbedtls_x509_crt_has_ext_type()

static int mbedtls_x509_crt_has_ext_type ( const mbedtls_x509_crt *  ctx,
int  ext_type 
)
inlinestatic

Definition at line 228 of file mbedtls_compat.h.