mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-03-31 17:51:11 +02:00
Test slot_number attribute
Test the behavior of the getter/setter functions. Test that psa_get_key_slot_number() reports a slot number for a key in a secure element, and doesn't report a slot number for a key that is not in a secure element. Test that psa_get_key_slot_number() reports the correct slot number for a key in a secure element.
This commit is contained in:
@@ -163,6 +163,18 @@ static inline void psa_set_key_slot_number(
|
||||
attributes->slot_number = slot_number;
|
||||
}
|
||||
|
||||
/** Remove the slot number attribute from a key attribute structure.
|
||||
*
|
||||
* This function undoes the action of psa_set_key_slot_number().
|
||||
*
|
||||
* \param[out] attributes The attribute structure to write to.
|
||||
*/
|
||||
static inline void psa_clear_key_slot_number(
|
||||
psa_key_attributes_t *attributes )
|
||||
{
|
||||
attributes->core.flags &= ~MBEDTLS_PSA_KA_FLAG_HAS_SLOT_NUMBER;
|
||||
}
|
||||
|
||||
#endif /* MBEDTLS_PSA_CRYPTO_SE_C */
|
||||
|
||||
/**@}*/
|
||||
|
||||
Reference in New Issue
Block a user