Smoke test for secure element driver registration
This commit is contained in:
parent
d910e928e8
commit
2c2243dc0b
@ -135,6 +135,7 @@ add_test_suite(psa_crypto_hash)
|
||||
add_test_suite(psa_crypto_init)
|
||||
add_test_suite(psa_crypto_metadata)
|
||||
add_test_suite(psa_crypto_persistent_key)
|
||||
add_test_suite(psa_crypto_se_driver_hal)
|
||||
add_test_suite(psa_crypto_slot_management)
|
||||
add_test_suite(psa_its)
|
||||
add_test_suite(shax)
|
||||
|
2
tests/suites/test_suite_psa_crypto_se_driver_hal.data
Normal file
2
tests/suites/test_suite_psa_crypto_se_driver_hal.data
Normal file
@ -0,0 +1,2 @@
|
||||
Register SE driver: good
|
||||
register_one:2:PSA_DRV_SE_HAL_VERSION:PSA_SUCCESS
|
29
tests/suites/test_suite_psa_crypto_se_driver_hal.function
Normal file
29
tests/suites/test_suite_psa_crypto_se_driver_hal.function
Normal file
@ -0,0 +1,29 @@
|
||||
/* BEGIN_HEADER */
|
||||
#include "psa_crypto_helpers.h"
|
||||
#include "psa/crypto_se_driver.h"
|
||||
|
||||
/* END_HEADER */
|
||||
|
||||
/* BEGIN_DEPENDENCIES
|
||||
* depends_on:MBEDTLS_PSA_CRYPTO_C
|
||||
* END_DEPENDENCIES
|
||||
*/
|
||||
|
||||
/* BEGIN_CASE */
|
||||
void register_one( int lifetime, int version, int expected_status_arg )
|
||||
{
|
||||
psa_status_t expected_status = expected_status_arg;
|
||||
psa_drv_se_t driver;
|
||||
|
||||
memset( &driver, 0, sizeof( driver ) );
|
||||
driver.hal_version = version;
|
||||
|
||||
TEST_EQUAL( psa_register_se_driver( lifetime, &driver ),
|
||||
expected_status );
|
||||
|
||||
PSA_ASSERT( psa_crypto_init( ) );
|
||||
|
||||
exit:
|
||||
PSA_DONE( );
|
||||
}
|
||||
/* END_CASE */
|
Loading…
Reference in New Issue
Block a user