refactor: update malloc/free config for QSEE
@@ -137,6 +137,7 @@ extern "C" {
defined(MBEDTLS_PLATFORM_CALLOC_MACRO)
#define mbedtls_free MBEDTLS_PLATFORM_FREE_MACRO
#define mbedtls_calloc MBEDTLS_PLATFORM_CALLOC_MACRO
+
#else
/* For size_t */
#include <stddef.h>
@@ -156,6 +157,11 @@ int mbedtls_platform_set_calloc_free( void * (*calloc_func)( size_t, size_t ),
void (*free_func)( void * ) );
#endif /* MBEDTLS_PLATFORM_FREE_MACRO && MBEDTLS_PLATFORM_CALLOC_MACRO */
#else /* !MBEDTLS_PLATFORM_MEMORY */
+ #if defined (MBEDTLS_PLATFORM_QSEE_ENTROPY)
+ #include "qsee_head.h"
+ #define mbedtls_free qsee_free
+ #define mbedtls_calloc qsee_calloc
+ #else
#define mbedtls_free free
#define mbedtls_calloc calloc
#endif /* MBEDTLS_PLATFORM_MEMORY && !MBEDTLS_PLATFORM_{FREE,CALLOC}_MACRO */
