Merge pull request #8434 from RonEld/change_platform_error

Change Mbed TLS platform error code and value
pull/8436/merge
Martin Kojtal 2018-10-16 07:17:33 -07:00 committed by GitHub
commit 8faf40e3b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -30,7 +30,7 @@ int crypto_platform_setup( crypto_platform_ctx *ctx )
NRF_CRYPTOCELL->ENABLE = 1;
if( SaSi_LibInit( &ctx->rndState, &rndWorkBuff ) != 0 )
return ( MBEDTLS_ERR_PLATFORM_HW_FAILED );
return ( MBEDTLS_ERR_PLATFORM_HW_ACCEL_FAILED );
return ( 0 );
}

View File

@ -25,4 +25,9 @@
#include "mbedtls_device.h"
#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_ACCEL_FAILED -0x0070