mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-01 10:06:53 +03:00
In attributes, keep track of slot number through a dedicated field
In `psa_key_attributes_t`, keep track of whether `slot_number` has been set through a dedicated field, rather than using a flag. This paves the way to removing `flags`, which is not used for anything else. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
@ -292,6 +292,7 @@ typedef uint16_t psa_key_attributes_flag_t;
|
||||
struct psa_key_attributes_s {
|
||||
#if defined(MBEDTLS_PSA_CRYPTO_SE_C)
|
||||
psa_key_slot_number_t MBEDTLS_PRIVATE(slot_number);
|
||||
int MBEDTLS_PRIVATE(has_slot_number);
|
||||
#endif /* MBEDTLS_PSA_CRYPTO_SE_C */
|
||||
psa_key_type_t MBEDTLS_PRIVATE(type);
|
||||
psa_key_bits_t MBEDTLS_PRIVATE(bits);
|
||||
@ -313,7 +314,7 @@ struct psa_key_attributes_s {
|
||||
};
|
||||
|
||||
#if defined(MBEDTLS_PSA_CRYPTO_SE_C)
|
||||
#define PSA_KEY_ATTRIBUTES_MAYBE_SLOT_NUMBER 0,
|
||||
#define PSA_KEY_ATTRIBUTES_MAYBE_SLOT_NUMBER 0, 0,
|
||||
#else
|
||||
#define PSA_KEY_ATTRIBUTES_MAYBE_SLOT_NUMBER
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user