mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 07:45:42 +01:00
Miscellaneous coding style fixes
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
parent
7587ae49cb
commit
7d54f661d3
@ -172,13 +172,13 @@ void transient_slot_lifecycle( int owner_id_arg,
|
|||||||
PSA_ASSERT( psa_crypto_init( ) );
|
PSA_ASSERT( psa_crypto_init( ) );
|
||||||
|
|
||||||
/* Import a key. */
|
/* Import a key. */
|
||||||
#if defined(MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER)
|
#if defined(MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER)
|
||||||
mbedtls_key_owner_id_t owner_id = owner_id_arg;
|
mbedtls_key_owner_id_t owner_id = owner_id_arg;
|
||||||
|
|
||||||
mbedtls_set_key_owner_id( &attributes, owner_id );
|
mbedtls_set_key_owner_id( &attributes, owner_id );
|
||||||
#else
|
#else
|
||||||
(void)owner_id_arg;
|
(void)owner_id_arg;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
psa_set_key_usage_flags( &attributes, usage_flags );
|
psa_set_key_usage_flags( &attributes, usage_flags );
|
||||||
psa_set_key_algorithm( &attributes, alg );
|
psa_set_key_algorithm( &attributes, alg );
|
||||||
@ -190,7 +190,7 @@ void transient_slot_lifecycle( int owner_id_arg,
|
|||||||
TEST_EQUAL( psa_get_key_type( &attributes ), type );
|
TEST_EQUAL( psa_get_key_type( &attributes ), type );
|
||||||
psa_reset_key_attributes( &attributes );
|
psa_reset_key_attributes( &attributes );
|
||||||
|
|
||||||
#if defined(MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER)
|
#if defined(MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER)
|
||||||
{
|
{
|
||||||
psa_key_handle_t handle;
|
psa_key_handle_t handle;
|
||||||
mbedtls_svc_key_id_t key_with_invalid_owner =
|
mbedtls_svc_key_id_t key_with_invalid_owner =
|
||||||
@ -203,7 +203,7 @@ void transient_slot_lifecycle( int owner_id_arg,
|
|||||||
TEST_EQUAL( psa_open_key( key_with_invalid_owner, &handle ),
|
TEST_EQUAL( psa_open_key( key_with_invalid_owner, &handle ),
|
||||||
PSA_ERROR_DOES_NOT_EXIST );
|
PSA_ERROR_DOES_NOT_EXIST );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Purge the key and make sure that it is still valid, as purging a
|
* Purge the key and make sure that it is still valid, as purging a
|
||||||
|
Loading…
Reference in New Issue
Block a user