This file contains the definitions and functions of the Mbed TLS platform abstraction layer. More...
Data Structures | |
| struct | mbedtls_platform_context |
| The platform context structure. More... | |
Macros | |
| #define | MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED -0x0072 |
| #define | MBEDTLS_ERR_PLATFORM_HW_ACCEL_FAILED -0x0070 |
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. | |
| typedef struct mbedtls_platform_context | mbedtls_platform_context |
| The platform context structure. | |
| int | mbedtls_platform_set_exit (void(*exit_func)(int status)) |
| This function dynamically configures the exit function that is called when the mbedtls_exit() function is invoked by the library. | |
| int | mbedtls_platform_set_printf (int(*printf_func)(const char *,...)) |
| This function dynamically configures the snprintf function that is called when the mbedtls_snprintf() function is invoked by the library. | |
| int | mbedtls_platform_setup (mbedtls_platform_context *ctx) |
| This function performs any platform-specific initialization operations. | |
| void | mbedtls_platform_teardown (mbedtls_platform_context *ctx) |
| This function performs any platform teardown operations. | |
This file contains the definitions and functions of the Mbed TLS platform abstraction layer.
The platform abstraction layer removes the need for the library to directly link to standard C library functions or operating system services, making the library easier to port and embed. Application developers and users of the library can provide their own implementations of these functions, or implementations specific to their platform, which can be statically linked to the library or dynamically configured at runtime.
| #define MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED -0x0072 |
The requested feature is not supported by the platform
| #define MBEDTLS_ERR_PLATFORM_HW_ACCEL_FAILED -0x0070 |
Hardware accelerator failed
| typedef struct mbedtls_platform_context mbedtls_platform_context |
The platform context structure.
| int mbedtls_platform_set_exit | ( | void(* | exit_func )(int status) | ) |
This function dynamically configures the exit function that is called when the mbedtls_exit() function is invoked by the library.
| exit_func | The exit function implementation. |
0 on success. | int mbedtls_platform_set_printf | ( | int(* | printf_func )(const char *,...) | ) |
This function dynamically configures the snprintf function that is called when the mbedtls_snprintf() function is invoked by the library.
| printf_func | The printf function implementation. |
0 on success. | 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. |