Adapt to the new key allocation mechanism
diff --git a/programs/ssl/ssl_client2.c b/programs/ssl/ssl_client2.c
index a98a3a2..a8c16dc 100644
--- a/programs/ssl/ssl_client2.c
+++ b/programs/ssl/ssl_client2.c
@@ -571,7 +571,7 @@
const char *pers = "ssl_client2";
#if defined(MBEDTLS_USE_PSA_CRYPTO)
- psa_key_slot_t slot = 0;
+ psa_key_handle_t slot = 0;
psa_algorithm_t alg = 0;
psa_key_policy_t policy;
psa_status_t status;
@@ -594,7 +594,7 @@
mbedtls_x509_crt clicert;
mbedtls_pk_context pkey;
#if defined(MBEDTLS_USE_PSA_CRYPTO)
- psa_key_slot_t key_slot = 0; /* invalid key slot */
+ psa_key_handle_t key_slot = 0; /* invalid key slot */
#endif
#endif
char *p, *q;
@@ -1594,7 +1594,7 @@
if( opt.psk_opaque != 0 )
{
/* The algorithm has already been determined earlier. */
- status = mbedtls_psa_get_free_key_slot( &slot );
+ status = psa_allocate_key( PSA_KEY_TYPE_DERIVE, psk_len * 8, &slot );
if( status != PSA_SUCCESS )
{
ret = MBEDTLS_ERR_SSL_HW_ACCEL_FAILED;