mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-29 22:20:30 +00:00
Return PSA translated errors in ECHDE-PSK part of ssl_parse_client_key_exchange()
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
parent
5a1455d8d5
commit
fb0a81ece9
@ -4096,8 +4096,10 @@ static int ssl_parse_client_key_exchange( mbedtls_ssl_context *ssl )
|
|||||||
destruction_status = psa_destroy_key( handshake->ecdh_psa_privkey );
|
destruction_status = psa_destroy_key( handshake->ecdh_psa_privkey );
|
||||||
handshake->ecdh_psa_privkey = MBEDTLS_SVC_KEY_ID_INIT;
|
handshake->ecdh_psa_privkey = MBEDTLS_SVC_KEY_ID_INIT;
|
||||||
|
|
||||||
if( status != PSA_SUCCESS || destruction_status != PSA_SUCCESS )
|
if( status != PSA_SUCCESS )
|
||||||
return( MBEDTLS_ERR_SSL_HW_ACCEL_FAILED );
|
return( psa_ssl_status_to_mbedtls( status ) );
|
||||||
|
else if( destruction_status != PSA_SUCCESS )
|
||||||
|
return( psa_ssl_status_to_mbedtls( destruction_status ) );
|
||||||
|
|
||||||
/* Write the ECDH computation length before the ECDH computation */
|
/* Write the ECDH computation length before the ECDH computation */
|
||||||
MBEDTLS_PUT_UINT16_BE( zlen, psm, 0 );
|
MBEDTLS_PUT_UINT16_BE( zlen, psm, 0 );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user