1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-08 17:42:09 +03:00

Introduce PSA_KEY_HANDLE_INIT macro

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
Ronald Cron
2020-07-30 17:48:03 +02:00
parent 98a54ddbd6
commit 91e9515424
19 changed files with 145 additions and 141 deletions

View File

@@ -507,7 +507,7 @@ static int tls_prf_generic( mbedtls_md_type_t md_type,
{
psa_status_t status;
psa_algorithm_t alg;
psa_key_handle_t master_slot = 0;
psa_key_handle_t master_slot = PSA_KEY_HANDLE_INIT;
psa_key_derivation_operation_t derivation =
PSA_KEY_DERIVATION_OPERATION_INIT;
@@ -4348,7 +4348,7 @@ static void ssl_conf_remove_psk( mbedtls_ssl_config *conf )
{
/* The maintenance of the PSK key slot is the
* user's responsibility. */
conf->psk_opaque = 0;
conf->psk_opaque = PSA_KEY_HANDLE_INIT;
}
/* This and the following branch should never
* be taken simultaenously as we maintain the
@@ -4434,7 +4434,7 @@ static void ssl_remove_psk( mbedtls_ssl_context *ssl )
#if defined(MBEDTLS_USE_PSA_CRYPTO)
if( ssl->handshake->psk_opaque != 0 )
{
ssl->handshake->psk_opaque = 0;
ssl->handshake->psk_opaque = PSA_KEY_HANDLE_INIT;
}
else
#endif /* MBEDTLS_USE_PSA_CRYPTO */