sys_mbedtls.h
Include dependency graph for sys_mbedtls.h:
This graph shows which files directly or indirectly include sys_mbedtls.h:
Functions
-
mbedtls_entropy_context *sys_mbedtls_get_entropy_context_lock(GlobalContext *global)
get and acquire lock on mbedtls_entropy_context.
this function must be called from a scheduler thread (nif, native handler, listener) to access the entropy context and should be balanced by
sys_mbedtls_entropy_context_unlock
. On non-SMP builds, there is no lock as there is only one scheduler.- Parameters:
global – the global context
-
void sys_mbedtls_entropy_context_unlock(GlobalContext *global)
release lock on mbedtls_entropy_context.
- Parameters:
global – the global context
-
int sys_mbedtls_entropy_func(void *entropy, unsigned char *buf, size_t size)
invoke
mbedtls_entropy_func
unless MBEDTLS_THREADING_C is defined, this function must acquire the entropy mutex to call
mbedtls_entropy_func
.
-
mbedtls_ctr_drbg_context *sys_mbedtls_get_ctr_drbg_context_lock(GlobalContext *global)
get and acquire lock on mbedtls_ctr_drbg_context.
this function must be called from a scheduler thread (nif, native handler, listener) to access the random context and should be balanced by
sys_mbedtls_ctr_drbg_context_unlock
. On non-SMP builds, there is no lock as there is only one scheduler.Warning
do not call this function when already owning the entropy context
-
void sys_mbedtls_ctr_drbg_context_unlock(GlobalContext *global)
release lock on mbedtls_ctr_drbg_context.
- Parameters:
global – the global context