Skip to content

Commit 8faf40e

Browse files
authored
Merge pull request #8434 from RonEld/change_platform_error
Change Mbed TLS platform error code and value
2 parents a6651b8 + 2620508 commit 8faf40e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

features/cryptocell/FEATURE_CRYPTOCELL310/TARGET_MCU_NRF52840/crypto_platform.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ int crypto_platform_setup( crypto_platform_ctx *ctx )
3030
NRF_CRYPTOCELL->ENABLE = 1;
3131

3232
if( SaSi_LibInit( &ctx->rndState, &rndWorkBuff ) != 0 )
33-
return ( MBEDTLS_ERR_PLATFORM_HW_FAILED );
33+
return ( MBEDTLS_ERR_PLATFORM_HW_ACCEL_FAILED );
3434

3535
return ( 0 );
3636
}

features/mbedtls/platform/inc/platform_mbed.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,9 @@
2525
#include "mbedtls_device.h"
2626
#endif
2727

28+
/*
29+
* MBEDTLS_ERR_PLATFORM_HW_FAILED is deprecated and should not be used.
30+
*/
2831
#define MBEDTLS_ERR_PLATFORM_HW_FAILED -0x0080
32+
33+
#define MBEDTLS_ERR_PLATFORM_HW_ACCEL_FAILED -0x0070

0 commit comments

Comments
 (0)