Introduce psa_key_handle_is_null inline function
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
diff --git a/programs/ssl/ssl_server2.c b/programs/ssl/ssl_server2.c
index c11b081..fce2e22 100644
--- a/programs/ssl/ssl_server2.c
+++ b/programs/ssl/ssl_server2.c
@@ -1303,7 +1303,7 @@
psa_status_t status;
psa_key_handle_t const slot = head->slot;
- if( slot != 0 )
+ if( ! psa_key_handle_is_null( slot ) )
{
status = psa_destroy_key( slot );
if( status != PSA_SUCCESS )
@@ -1376,7 +1376,7 @@
memcmp( name, cur->name, name_len ) == 0 )
{
#if defined(MBEDTLS_USE_PSA_CRYPTO)
- if( cur->slot != 0 )
+ if( ! psa_key_handle_is_null( cur->slot ) )
return( mbedtls_ssl_set_hs_psk_opaque( ssl, cur->slot ) );
else
#endif