ReactOS  0.4.14-dev-50-g13bb5e2
schannel_mbedtls_lazyload.h File Reference

Go to the source code of this file.

Macros

#define MAKE_FUNCPTR(f)   static typeof(f) * p##f;
 
#define LOAD_FUNCPTR(f)
 
#define schan_imp_init   schan_imp_init_unused
 
#define schan_imp_deinit   schan_imp_deinit_unused
 
#define mbedtls_ctr_drbg_free   pmbedtls_ctr_drbg_free
 
#define mbedtls_ctr_drbg_init   pmbedtls_ctr_drbg_init
 
#define mbedtls_ctr_drbg_random   pmbedtls_ctr_drbg_random
 
#define mbedtls_entropy_free   pmbedtls_entropy_free
 
#define mbedtls_entropy_func   pmbedtls_entropy_func
 
#define mbedtls_entropy_init   pmbedtls_entropy_init
 
#define mbedtls_ssl_ciphersuite_from_id   pmbedtls_ssl_ciphersuite_from_id
 
#define mbedtls_ssl_free   pmbedtls_ssl_free
 
#define mbedtls_ssl_get_ciphersuite   pmbedtls_ssl_get_ciphersuite
 
#define mbedtls_ssl_get_ciphersuite_id   pmbedtls_ssl_get_ciphersuite_id
 
#define mbedtls_ssl_get_max_frag_len   pmbedtls_ssl_get_max_frag_len
 
#define mbedtls_ssl_get_version   pmbedtls_ssl_get_version
 
#define mbedtls_ssl_handshake   pmbedtls_ssl_handshake
 
#define mbedtls_ssl_init   pmbedtls_ssl_init
 
#define mbedtls_ssl_read   pmbedtls_ssl_read
 
#define mbedtls_ssl_conf_authmode   pmbedtls_ssl_conf_authmode
 
#define mbedtls_ssl_set_bio   pmbedtls_ssl_set_bio
 
#define mbedtls_ssl_conf_endpoint   pmbedtls_ssl_conf_endpoint
 
#define mbedtls_ssl_set_hostname   pmbedtls_ssl_set_hostname
 
#define mbedtls_ssl_conf_max_version   pmbedtls_ssl_conf_max_version
 
#define mbedtls_ssl_conf_min_version   pmbedtls_ssl_conf_min_version
 
#define mbedtls_ssl_conf_rng   pmbedtls_ssl_conf_rng
 
#define mbedtls_ssl_write   pmbedtls_ssl_write
 
#define mbedtls_ssl_get_peer_cert   pmbedtls_ssl_get_peer_cert
 
#define mbedtls_ssl_config_init   pmbedtls_ssl_config_init
 
#define mbedtls_ssl_config_free   pmbedtls_ssl_config_free
 
#define mbedtls_ssl_config_defaults   pmbedtls_ssl_config_defaults
 
#define mbedtls_ssl_conf_dbg   pmbedtls_ssl_conf_dbg
 
#define mbedtls_ssl_setup   pmbedtls_ssl_setup
 
#define mbedtls_cipher_info_from_type   pmbedtls_cipher_info_from_type
 
#define mbedtls_md_info_from_type   pmbedtls_md_info_from_type
 
#define mbedtls_pk_get_bitlen   pmbedtls_pk_get_bitlen
 

Functions

BOOL schan_imp_init (void)
 
void schan_imp_deinit (void)
 

Variables

static voidlibmbedtls_handle
 

Macro Definition Documentation

◆ LOAD_FUNCPTR

#define LOAD_FUNCPTR (   f)
Value:
if (!(p##f = wine_dlsym(libmbedtls_handle, #f, NULL, 0))) \
{ \
ERR("Failed to retrieve function %s from the mbedTLS dynamic library (" SONAME_LIBMBEDTLS ")\n", #f); \
goto fail; \
}
static void * libmbedtls_handle
void * wine_dlsym(void *handle, const char *symbol, char *error, size_t errorsize)
Definition: loader.c:48
smooth NULL
Definition: ftsmooth.c:416
GLfloat f
Definition: glext.h:7540
#define SONAME_LIBMBEDTLS
Definition: config.h:1245
GLfloat GLfloat p
Definition: glext.h:8902

◆ MAKE_FUNCPTR

#define MAKE_FUNCPTR (   f)    static typeof(f) * p##f;

Definition at line 25 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_cipher_info_from_type

#define mbedtls_cipher_info_from_type   pmbedtls_cipher_info_from_type

Definition at line 171 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_ctr_drbg_free

#define mbedtls_ctr_drbg_free   pmbedtls_ctr_drbg_free

Definition at line 142 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_ctr_drbg_init

#define mbedtls_ctr_drbg_init   pmbedtls_ctr_drbg_init

Definition at line 143 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_ctr_drbg_random

#define mbedtls_ctr_drbg_random   pmbedtls_ctr_drbg_random

Definition at line 144 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_entropy_free

#define mbedtls_entropy_free   pmbedtls_entropy_free

Definition at line 145 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_entropy_func

#define mbedtls_entropy_func   pmbedtls_entropy_func

Definition at line 146 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_entropy_init

#define mbedtls_entropy_init   pmbedtls_entropy_init

Definition at line 147 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_md_info_from_type

#define mbedtls_md_info_from_type   pmbedtls_md_info_from_type

Definition at line 172 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_pk_get_bitlen

#define mbedtls_pk_get_bitlen   pmbedtls_pk_get_bitlen

Definition at line 173 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_ssl_ciphersuite_from_id

#define mbedtls_ssl_ciphersuite_from_id   pmbedtls_ssl_ciphersuite_from_id

Definition at line 148 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_ssl_conf_authmode

#define mbedtls_ssl_conf_authmode   pmbedtls_ssl_conf_authmode

Definition at line 157 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_ssl_conf_dbg

#define mbedtls_ssl_conf_dbg   pmbedtls_ssl_conf_dbg

Definition at line 169 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_ssl_conf_endpoint

#define mbedtls_ssl_conf_endpoint   pmbedtls_ssl_conf_endpoint

Definition at line 159 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_ssl_conf_max_version

#define mbedtls_ssl_conf_max_version   pmbedtls_ssl_conf_max_version

Definition at line 161 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_ssl_conf_min_version

#define mbedtls_ssl_conf_min_version   pmbedtls_ssl_conf_min_version

Definition at line 162 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_ssl_conf_rng

#define mbedtls_ssl_conf_rng   pmbedtls_ssl_conf_rng

Definition at line 163 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_ssl_config_defaults

#define mbedtls_ssl_config_defaults   pmbedtls_ssl_config_defaults

Definition at line 168 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_ssl_config_free

#define mbedtls_ssl_config_free   pmbedtls_ssl_config_free

Definition at line 167 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_ssl_config_init

#define mbedtls_ssl_config_init   pmbedtls_ssl_config_init

Definition at line 166 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_ssl_free

#define mbedtls_ssl_free   pmbedtls_ssl_free

Definition at line 149 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_ssl_get_ciphersuite

#define mbedtls_ssl_get_ciphersuite   pmbedtls_ssl_get_ciphersuite

Definition at line 150 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_ssl_get_ciphersuite_id

#define mbedtls_ssl_get_ciphersuite_id   pmbedtls_ssl_get_ciphersuite_id

Definition at line 151 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_ssl_get_max_frag_len

#define mbedtls_ssl_get_max_frag_len   pmbedtls_ssl_get_max_frag_len

Definition at line 152 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_ssl_get_peer_cert

#define mbedtls_ssl_get_peer_cert   pmbedtls_ssl_get_peer_cert

Definition at line 165 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_ssl_get_version

#define mbedtls_ssl_get_version   pmbedtls_ssl_get_version

Definition at line 153 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_ssl_handshake

#define mbedtls_ssl_handshake   pmbedtls_ssl_handshake

Definition at line 154 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_ssl_init

#define mbedtls_ssl_init   pmbedtls_ssl_init

Definition at line 155 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_ssl_read

#define mbedtls_ssl_read   pmbedtls_ssl_read

Definition at line 156 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_ssl_set_bio

#define mbedtls_ssl_set_bio   pmbedtls_ssl_set_bio

Definition at line 158 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_ssl_set_hostname

#define mbedtls_ssl_set_hostname   pmbedtls_ssl_set_hostname

Definition at line 160 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_ssl_setup

#define mbedtls_ssl_setup   pmbedtls_ssl_setup

Definition at line 170 of file schannel_mbedtls_lazyload.h.

◆ mbedtls_ssl_write

#define mbedtls_ssl_write   pmbedtls_ssl_write

Definition at line 164 of file schannel_mbedtls_lazyload.h.

◆ schan_imp_deinit

#define schan_imp_deinit   schan_imp_deinit_unused

Definition at line 138 of file schannel_mbedtls_lazyload.h.

◆ schan_imp_init

#define schan_imp_init   schan_imp_init_unused

Definition at line 137 of file schannel_mbedtls_lazyload.h.

Function Documentation

◆ schan_imp_deinit()

void schan_imp_deinit ( void  )

Definition at line 128 of file schannel_mbedtls_lazyload.h.

129 {
132 }
static void * libmbedtls_handle
smooth NULL
Definition: ftsmooth.c:416
int wine_dlclose(void *handle, char *error, size_t errorsize)
Definition: loader.c:58

◆ schan_imp_init()

BOOL schan_imp_init ( void  )

Definition at line 65 of file schannel_mbedtls_lazyload.h.

66 {
68 
69  if (!libmbedtls_handle)
70  {
71  WARN("Failed to load the mbedTLS dynamic library (" SONAME_LIBMBEDTLS ").\n");
72  return FALSE;
73  }
74 
75 #define LOAD_FUNCPTR(f) \
76  if (!(p##f = wine_dlsym(libmbedtls_handle, #f, NULL, 0))) \
77  { \
78  ERR("Failed to retrieve function %s from the mbedTLS dynamic library (" SONAME_LIBMBEDTLS ")\n", #f); \
79  goto fail; \
80  }
81 
115 
116 #undef LOAD_FUNCPTR
117 
118  return TRUE;
119 
120 fail:
121 
124 
125  return FALSE;
126 }
#define mbedtls_ssl_set_bio
#define TRUE
Definition: types.h:120
#define mbedtls_ssl_get_ciphersuite_id
static void * libmbedtls_handle
#define WARN(fmt,...)
Definition: debug.h:111
#define mbedtls_ssl_conf_max_version
#define mbedtls_ssl_get_version
#define mbedtls_ssl_free
#define mbedtls_ssl_config_free
#define mbedtls_ssl_config_defaults
#define mbedtls_ctr_drbg_init
#define mbedtls_ctr_drbg_free
smooth NULL
Definition: ftsmooth.c:416
void * wine_dlopen(const char *filename, int flag, char *error, size_t errorsize)
Definition: loader.c:53
#define mbedtls_ssl_conf_rng
#define mbedtls_ssl_conf_authmode
#define mbedtls_ssl_config_init
#define mbedtls_ssl_setup
#define mbedtls_ssl_init
#define RTLD_NOW
Definition: port.h:100
#define mbedtls_pk_get_bitlen
int mbedtls_ctr_drbg_seed(mbedtls_ctr_drbg_context *ctx, int(*f_entropy)(void *, unsigned char *, size_t), void *p_entropy, const unsigned char *custom, size_t len)
This function seeds and sets up the CTR_DRBG entropy source for future reseeds.
#define mbedtls_entropy_func
#define SONAME_LIBMBEDTLS
Definition: config.h:1245
#define mbedtls_ssl_ciphersuite_from_id
#define LOAD_FUNCPTR(f)
#define mbedtls_ctr_drbg_random
#define mbedtls_md_info_from_type
#define mbedtls_cipher_info_from_type
#define mbedtls_ssl_get_peer_cert
#define mbedtls_ssl_get_ciphersuite
#define mbedtls_entropy_free
#define mbedtls_ssl_get_max_frag_len
#define mbedtls_entropy_init
#define mbedtls_ssl_conf_dbg
#define mbedtls_ssl_conf_endpoint
#define mbedtls_ssl_set_hostname
#define mbedtls_ssl_write
#define mbedtls_ssl_conf_min_version
#define mbedtls_ssl_read
int wine_dlclose(void *handle, char *error, size_t errorsize)
Definition: loader.c:58
#define mbedtls_ssl_handshake

Variable Documentation

◆ libmbedtls_handle

void* libmbedtls_handle
static

Definition at line 23 of file schannel_mbedtls_lazyload.h.

Referenced by schan_imp_deinit(), and schan_imp_init().