tls: psa_pake: make round two reading function symmatric to the writing one

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
This commit is contained in:
Valerio Setti 2022-11-17 16:36:19 +01:00
parent 30ebe11f86
commit 9bed8ec5d8
4 changed files with 27 additions and 26 deletions

View file

@ -4115,8 +4115,7 @@ static int ssl_parse_client_key_exchange( mbedtls_ssl_context *ssl )
{
#if defined(MBEDTLS_USE_PSA_CRYPTO)
if( ( ret = mbedtls_psa_ecjpake_read_round_two(
&ssl->handshake->psa_pake_ctx, p, end - p,
ssl->conf->endpoint ) ) != 0 )
&ssl->handshake->psa_pake_ctx, p, end - p ) ) != 0 )
{
psa_destroy_key( ssl->handshake->psa_pake_password );
psa_pake_abort( &ssl->handshake->psa_pake_ctx );