mirror of https://github.com/ARMmbed/mbed-os.git
Change Mbed TLS platform error code and value
Change error from `MBEDTLS_PLATFORM_HW_FAILED` to `MBEDTLS_PLATFORM_HW_ACCEL_FAILED` and the value to 0x70, as the previous value cannot be used as a low level error code.pull/8479/head
parent
cc09e069a0
commit
78246e46d1
|
@ -30,7 +30,7 @@ int crypto_platform_setup( crypto_platform_ctx *ctx )
|
||||||
NRF_CRYPTOCELL->ENABLE = 1;
|
NRF_CRYPTOCELL->ENABLE = 1;
|
||||||
|
|
||||||
if( SaSi_LibInit( &ctx->rndState, &rndWorkBuff ) != 0 )
|
if( SaSi_LibInit( &ctx->rndState, &rndWorkBuff ) != 0 )
|
||||||
return ( MBEDTLS_ERR_PLATFORM_HW_FAILED );
|
return ( MBEDTLS_ERR_PLATFORM_HW_ACCEL_FAILED );
|
||||||
|
|
||||||
return ( 0 );
|
return ( 0 );
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,4 +25,9 @@
|
||||||
#include "mbedtls_device.h"
|
#include "mbedtls_device.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MBEDTLS_ERR_PLATFORM_HW_FAILED is deprecated and should not be used.
|
||||||
|
*/
|
||||||
#define MBEDTLS_ERR_PLATFORM_HW_FAILED -0x0080
|
#define MBEDTLS_ERR_PLATFORM_HW_FAILED -0x0080
|
||||||
|
|
||||||
|
#define MBEDTLS_ERR_PLATFORM_HW_ACCEL_FAILED -0x0070
|
||||||
|
|
Loading…
Reference in New Issue