mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-04-27 14:03:50 +02:00
Always include platform.h for MBEDTLS_ERR_PLATFORM_xxx
Recognize MBEDTLS_ERR_PLATFORM_xxx in mbedtls_to_psa_error().
This commit is contained in:
@@ -39,9 +39,8 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "mbedtls/platform.h"
|
||||
#else
|
||||
#if !defined(MBEDTLS_PLATFORM_C)
|
||||
#define mbedtls_calloc calloc
|
||||
#define mbedtls_free free
|
||||
#endif
|
||||
@@ -284,6 +283,11 @@ static psa_status_t mbedtls_to_psa_error( int ret )
|
||||
case MBEDTLS_ERR_PK_HW_ACCEL_FAILED:
|
||||
return( PSA_ERROR_HARDWARE_FAILURE );
|
||||
|
||||
case MBEDTLS_ERR_PLATFORM_HW_ACCEL_FAILED:
|
||||
return( PSA_ERROR_HARDWARE_FAILURE );
|
||||
case MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED:
|
||||
return( PSA_ERROR_NOT_SUPPORTED );
|
||||
|
||||
case MBEDTLS_ERR_RIPEMD160_HW_ACCEL_FAILED:
|
||||
return( PSA_ERROR_HARDWARE_FAILURE );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user