Fix missing initialisation of PSA Crypto
This fixes the two failures in test_suite_x509parse when both ECP_RESTARTABLE and USE_PSA_CRYPTO are enabled. The failure happened because the operation is dispatched to PSA when restart is disabled (max_ops == 0). Previously it was correct for this test function not to initialize PSA, because it depends on ECP_RESTARTABLE which used to conflict with USE_PSA_CRYPTO, but that's no longer the case. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
parent
79ae7eb4d1
commit
cc6e0a650f
1 changed files with 3 additions and 0 deletions
|
@ -579,6 +579,8 @@ void x509_verify_restart( char *crt_file, char *ca_file,
|
|||
mbedtls_x509_crt_init( &crt );
|
||||
mbedtls_x509_crt_init( &ca );
|
||||
|
||||
USE_PSA_INIT( );
|
||||
|
||||
TEST_ASSERT( mbedtls_x509_crt_parse_file( &crt, crt_file ) == 0 );
|
||||
TEST_ASSERT( mbedtls_x509_crt_parse_file( &ca, ca_file ) == 0 );
|
||||
|
||||
|
@ -607,6 +609,7 @@ exit:
|
|||
mbedtls_x509_crt_restart_free( &rs_ctx );
|
||||
mbedtls_x509_crt_free( &crt );
|
||||
mbedtls_x509_crt_free( &ca );
|
||||
USE_PSA_DONE( );
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
|
|
Loading…
Reference in a new issue