Adapt to the new key allocation mechanism

This commit is contained in:
Andrzej Kurek 2019-01-08 09:36:01 -05:00
parent a49a94a536
commit 2349c4db88
14 changed files with 65 additions and 79 deletions

View file

@ -42,21 +42,6 @@
#include "md.h"
#include "pk.h"
/* Slot allocation */
static inline psa_status_t mbedtls_psa_get_free_key_slot( psa_key_slot_t *key )
{
for( psa_key_slot_t slot = 1; slot <= 32; slot++ )
{
if( psa_get_key_information( slot, NULL, NULL ) == PSA_ERROR_EMPTY_SLOT )
{
*key = slot;
return( PSA_SUCCESS );
}
}
return( PSA_ERROR_INSUFFICIENT_MEMORY );
}
/* Translations for symmetric crypto. */
static inline psa_key_type_t mbedtls_psa_translate_cipher_type(