Mbed OS Reference
|
Data Structures | |
struct | mbedtls_platform_context |
The platform context structure. More... | |
Macros | |
#define | MBEDTLS_ERR_PLATFORM_HW_ACCEL_FAILED -0x0070 |
Hardware accelerator failed. More... | |
#define | MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED -0x0072 |
The requested feature is not supported by the platform. More... | |
Typedefs | |
typedef struct mbedtls_platform_context | mbedtls_platform_context |
The platform context structure. More... | |
Functions | |
int | mbedtls_platform_setup (mbedtls_platform_context *ctx) |
This function performs any platform-specific initialization operations. More... | |
void | mbedtls_platform_teardown (mbedtls_platform_context *ctx) |
This function performs any platform teardown operations. More... | |
void | mbedtls_platform_zeroize (void *buf, size_t len) |
Securely zeroize a buffer. More... | |
SECTION: Module settings | |
The configuration options you can set for this module are in this section. Either change them in config.h or define them on the compiler command line. | |
#define | MBEDTLS_PLATFORM_STD_SNPRINTF snprintf |
The default snprintf function to use. More... | |
#define | MBEDTLS_PLATFORM_STD_VSNPRINTF vsnprintf |
The default vsnprintf function to use. More... | |
#define | MBEDTLS_PLATFORM_STD_PRINTF printf |
The default printf function to use. More... | |
#define | MBEDTLS_PLATFORM_STD_FPRINTF fprintf |
The default fprintf function to use. More... | |
#define | MBEDTLS_PLATFORM_STD_CALLOC calloc |
The default calloc function to use. More... | |
#define | MBEDTLS_PLATFORM_STD_FREE free |
The default free function to use. More... | |
#define | MBEDTLS_PLATFORM_STD_EXIT exit |
The default exit function to use. More... | |
#define | MBEDTLS_PLATFORM_STD_TIME time |
The default time function to use. More... | |
#define | MBEDTLS_PLATFORM_STD_EXIT_SUCCESS EXIT_SUCCESS |
The default exit value to use. More... | |
#define | MBEDTLS_PLATFORM_STD_EXIT_FAILURE EXIT_FAILURE |
The default exit value to use. More... | |
#define MBEDTLS_ERR_PLATFORM_HW_ACCEL_FAILED -0x0070 |
Hardware accelerator failed.
Definition at line 51 of file connectivity/mbedtls/include/mbedtls/platform.h.
#define MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED -0x0072 |
The requested feature is not supported by the platform.
Definition at line 52 of file connectivity/mbedtls/include/mbedtls/platform.h.
#define MBEDTLS_PLATFORM_STD_SNPRINTF snprintf |
The default snprintf
function to use.
Definition at line 83 of file connectivity/mbedtls/include/mbedtls/platform.h.
#define MBEDTLS_PLATFORM_STD_VSNPRINTF vsnprintf |
The default vsnprintf
function to use.
Definition at line 90 of file connectivity/mbedtls/include/mbedtls/platform.h.
#define MBEDTLS_PLATFORM_STD_PRINTF printf |
The default printf
function to use.
Definition at line 94 of file connectivity/mbedtls/include/mbedtls/platform.h.
#define MBEDTLS_PLATFORM_STD_FPRINTF fprintf |
The default fprintf
function to use.
Definition at line 97 of file connectivity/mbedtls/include/mbedtls/platform.h.
#define MBEDTLS_PLATFORM_STD_CALLOC calloc |
The default calloc
function to use.
Definition at line 100 of file connectivity/mbedtls/include/mbedtls/platform.h.
#define MBEDTLS_PLATFORM_STD_FREE free |
The default free
function to use.
Definition at line 103 of file connectivity/mbedtls/include/mbedtls/platform.h.
#define MBEDTLS_PLATFORM_STD_EXIT exit |
The default exit
function to use.
Definition at line 106 of file connectivity/mbedtls/include/mbedtls/platform.h.
#define MBEDTLS_PLATFORM_STD_TIME time |
The default time
function to use.
Definition at line 109 of file connectivity/mbedtls/include/mbedtls/platform.h.
#define MBEDTLS_PLATFORM_STD_EXIT_SUCCESS EXIT_SUCCESS |
The default exit value to use.
Definition at line 112 of file connectivity/mbedtls/include/mbedtls/platform.h.
#define MBEDTLS_PLATFORM_STD_EXIT_FAILURE EXIT_FAILURE |
The default exit value to use.
Definition at line 115 of file connectivity/mbedtls/include/mbedtls/platform.h.
typedef struct mbedtls_platform_context mbedtls_platform_context |
The platform context structure.
int mbedtls_platform_setup | ( | mbedtls_platform_context * | ctx | ) |
This function performs any platform-specific initialization operations.
Its implementation is platform-specific, and unless platform-specific code is provided, it does nothing.
ctx | The platform context. |
0
on success. void mbedtls_platform_teardown | ( | mbedtls_platform_context * | ctx | ) |
This function performs any platform teardown operations.
Its implementation is platform-specific, and unless platform-specific code is provided, it does nothing.
ctx | The platform context. |
void mbedtls_platform_zeroize | ( | void * | buf, |
size_t | len | ||
) |
Securely zeroize a buffer.
The function is meant to wipe the data contained in a buffer so that it can no longer be recovered even if the program memory is later compromised. Call this function on sensitive data stored on the stack before returning from a function, and on sensitive data stored on the heap before freeing the heap object. It is extremely difficult to guarantee that calls to mbedtls_platform_zeroize() are not removed by aggressive compiler optimizations in a portable way. For this reason, Mbed TLS provides the configuration option MBEDTLS_PLATFORM_ZEROIZE_ALT, which allows users to configure mbedtls_platform_zeroize() to use a suitable implementation for their platform and needs
buf | Buffer to be zeroized |
len | Length of the buffer in bytes |