Rename mbedtls_ssl_handshake_params variable ecdh_psa_shared_key to ecdh_psa_privkey_is_external

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
Neil Armstrong 2022-04-04 11:23:46 +02:00
parent 91477a7964
commit f716a700a1
3 changed files with 5 additions and 5 deletions

View file

@ -2894,7 +2894,7 @@ static int ssl_get_ecdh_params_from_cert( mbedtls_ssl_context *ssl )
psa_reset_key_attributes( &key_attributes );
/* Key should not be destroyed in the TLS library */
ssl->handshake->ecdh_psa_shared_key = 1;
ssl->handshake->ecdh_psa_privkey_is_external = 1;
ret = 0;
break;
@ -3974,13 +3974,13 @@ static int ssl_parse_client_key_exchange( mbedtls_ssl_context *ssl )
{
ret = psa_ssl_status_to_mbedtls( status );
MBEDTLS_SSL_DEBUG_RET( 1, "psa_raw_key_agreement", ret );
if( handshake->ecdh_psa_shared_key == 0 )
if( handshake->ecdh_psa_privkey_is_external == 0 )
(void) psa_destroy_key( handshake->ecdh_psa_privkey );
handshake->ecdh_psa_privkey = MBEDTLS_SVC_KEY_ID_INIT;
return( ret );
}
if( handshake->ecdh_psa_shared_key == 0 )
if( handshake->ecdh_psa_privkey_is_external == 0 )
{
status = psa_destroy_key( handshake->ecdh_psa_privkey );