Initialize PSA Crypto implementation at the start of each test suite
This commit is contained in:
parent
b26c1938d2
commit
1cfc5ddb11
1 changed files with 18 additions and 1 deletions
|
@ -25,6 +25,9 @@
|
||||||
#include MBEDTLS_CONFIG_FILE
|
#include MBEDTLS_CONFIG_FILE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||||
|
#include "psa/crypto.h"
|
||||||
|
#endif /* MBEDTLS_USE_PSA_CRYPTO */
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------------*/
|
||||||
/* Common helper code */
|
/* Common helper code */
|
||||||
|
@ -221,8 +224,22 @@ int main( int argc, const char *argv[] )
|
||||||
ret );
|
ret );
|
||||||
return( -1 );
|
return( -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||||
|
{
|
||||||
|
psa_status_t status;
|
||||||
|
status = psa_crypto_init();
|
||||||
|
if( status != PSA_SUCCESS )
|
||||||
|
{
|
||||||
|
mbedtls_fprintf( stderr,
|
||||||
|
"FATAL: Failed to initialize PSA Crypto - error %d\n",
|
||||||
|
status );
|
||||||
|
return( -1 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif /* MBEDTLS_USE_PSA_CRYPTO */
|
||||||
|
|
||||||
ret = execute_tests( argc, argv );
|
ret = execute_tests( argc, argv );
|
||||||
platform_teardown();
|
platform_teardown();
|
||||||
return( ret );
|
return( ret );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue