From 72d6030f89a25a66e40313b0a20d2cb3012f59e0 Mon Sep 17 00:00:00 2001 From: Anton Matkin Date: Wed, 19 Mar 2025 14:56:57 +0100 Subject: [PATCH] Combine psa_pake_set_password_key and psa_pake_setup into a single function Signed-off-by: Anton Matkin --- library/ssl_tls.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/library/ssl_tls.c b/library/ssl_tls.c index 051fce36e3..dee80292e2 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -1827,7 +1827,7 @@ static psa_status_t mbedtls_ssl_set_hs_ecjpake_password_common( 256)); psa_pake_cs_set_hash(&cipher_suite, PSA_ALG_SHA_256); - status = psa_pake_setup(&ssl->handshake->psa_pake_ctx, &cipher_suite); + status = psa_pake_setup(&ssl->handshake->psa_pake_ctx, pwd, &cipher_suite); if (status != PSA_SUCCESS) { return status; } @@ -1854,11 +1854,6 @@ static psa_status_t mbedtls_ssl_set_hs_ecjpake_password_common( return status; } - status = psa_pake_set_password_key(&ssl->handshake->psa_pake_ctx, pwd); - if (status != PSA_SUCCESS) { - return status; - } - ssl->handshake->psa_pake_ctx_is_ok = 1; return PSA_SUCCESS;