Remove lifetime test functions
With the handle-based slot management interface, psa_set_key_lifetime will no longer exist, so remove the corresponding unit tests.
This commit is contained in:
parent
dc911fd594
commit
a8860b2990
2 changed files with 0 additions and 67 deletions
|
@ -471,18 +471,6 @@ PSA key policy: agreement, wrong algorithm
|
|||
depends_on:MBEDTLS_PK_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_ECDH_C
|
||||
agreement_key_policy:PSA_KEY_USAGE_DERIVE:PSA_ALG_ECDH(PSA_ALG_SELECT_RAW):PSA_KEY_TYPE_ECC_KEYPAIR(PSA_ECC_CURVE_SECP256R1):"49c9a8c18c4b885638c431cf1df1c994131609b580d4fd43a0cab17db2f13eee":PSA_ALG_FFDH(PSA_ALG_SELECT_RAW)
|
||||
|
||||
PSA key lifetime: set and get volatile
|
||||
key_lifetime:PSA_KEY_LIFETIME_VOLATILE
|
||||
|
||||
PSA key lifetime set: invalid key slot
|
||||
key_lifetime_set_fail:0:PSA_KEY_LIFETIME_VOLATILE:PSA_ERROR_INVALID_ARGUMENT
|
||||
|
||||
PSA key lifetime set: cannot change write_once lifetime
|
||||
key_lifetime_set_fail:1:PSA_KEY_LIFETIME_WRITE_ONCE:PSA_ERROR_NOT_SUPPORTED
|
||||
|
||||
PSA key lifetime set: invalid key lifetime value
|
||||
key_lifetime_set_fail:1:PSA_KEY_LIFETIME_PERSISTENT+1:PSA_ERROR_INVALID_ARGUMENT
|
||||
|
||||
PSA hash setup: good, SHA-1
|
||||
depends_on:MBEDTLS_SHA1_C
|
||||
hash_setup:PSA_ALG_SHA_1:PSA_SUCCESS
|
||||
|
|
|
@ -1733,61 +1733,6 @@ exit:
|
|||
}
|
||||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE */
|
||||
void key_lifetime( int lifetime_arg )
|
||||
{
|
||||
int key_slot = 1;
|
||||
psa_key_type_t key_type = PSA_KEY_TYPE_RAW_DATA;
|
||||
unsigned char key[32] = {0};
|
||||
psa_key_lifetime_t lifetime_set = lifetime_arg;
|
||||
psa_key_lifetime_t lifetime_get;
|
||||
|
||||
memset( key, 0x2a, sizeof( key ) );
|
||||
|
||||
TEST_ASSERT( psa_crypto_init( ) == PSA_SUCCESS );
|
||||
|
||||
TEST_ASSERT( psa_set_key_lifetime( key_slot,
|
||||
lifetime_set ) == PSA_SUCCESS );
|
||||
|
||||
TEST_ASSERT( psa_import_key( key_slot, key_type,
|
||||
key, sizeof( key ) ) == PSA_SUCCESS );
|
||||
|
||||
TEST_ASSERT( psa_get_key_lifetime( key_slot,
|
||||
&lifetime_get ) == PSA_SUCCESS );
|
||||
|
||||
TEST_ASSERT( lifetime_get == lifetime_set );
|
||||
|
||||
exit:
|
||||
psa_destroy_key( key_slot );
|
||||
mbedtls_psa_crypto_free( );
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE */
|
||||
void key_lifetime_set_fail( int key_slot_arg,
|
||||
int lifetime_arg,
|
||||
int expected_status_arg )
|
||||
{
|
||||
psa_key_slot_t key_slot = key_slot_arg;
|
||||
psa_key_lifetime_t lifetime_set = lifetime_arg;
|
||||
psa_status_t actual_status;
|
||||
psa_status_t expected_status = expected_status_arg;
|
||||
|
||||
TEST_ASSERT( psa_crypto_init( ) == PSA_SUCCESS );
|
||||
|
||||
actual_status = psa_set_key_lifetime( key_slot, lifetime_set );
|
||||
|
||||
if( actual_status == PSA_SUCCESS )
|
||||
actual_status = psa_set_key_lifetime( key_slot, lifetime_set );
|
||||
|
||||
TEST_ASSERT( expected_status == actual_status );
|
||||
|
||||
exit:
|
||||
psa_destroy_key( key_slot );
|
||||
mbedtls_psa_crypto_free( );
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE */
|
||||
void hash_setup( int alg_arg,
|
||||
int expected_status_arg )
|
||||
|
|
Loading…
Reference in a new issue