Simplify key slot allocation
Now that psa_allocate_key() is no longer a public function, expose
psa_internal_allocate_key_slot() instead, which provides a pointer to
the slot to its caller.
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index f4eb3a1..b3be261 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -1305,10 +1305,7 @@
psa_status_t status;
psa_key_slot_t *slot;
- status = psa_allocate_key( handle );
- if( status != PSA_SUCCESS )
- return( status );
- status = psa_get_key_slot( *handle, p_slot );
+ status = psa_internal_allocate_key_slot( handle, p_slot );
if( status != PSA_SUCCESS )
return( status );
slot = *p_slot;