Make empty key slots explicit
Add new status field to key slots, and use it.
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index bbd6b24..0660ee4 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -1786,6 +1786,7 @@
* definition. */
slot->attr = attributes->core;
+ slot->status = PSA_SLOT_OCCUPIED;
if (PSA_KEY_LIFETIME_IS_VOLATILE(slot->attr.lifetime)) {
#if !defined(MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER)
slot->attr.id = volatile_key_id;