mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-07 06:42:56 +03:00
Combine psa_pake_set_password_key and psa_pake_setup into a single function
Signed-off-by: Anton Matkin <anton.matkin@arm.com>
This commit is contained in:
committed by
Manuel Pégourié-Gonnard
parent
40486a404d
commit
72d6030f89
@@ -1827,7 +1827,7 @@ static psa_status_t mbedtls_ssl_set_hs_ecjpake_password_common(
|
|||||||
256));
|
256));
|
||||||
psa_pake_cs_set_hash(&cipher_suite, PSA_ALG_SHA_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) {
|
if (status != PSA_SUCCESS) {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
@@ -1854,11 +1854,6 @@ static psa_status_t mbedtls_ssl_set_hs_ecjpake_password_common(
|
|||||||
return status;
|
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;
|
ssl->handshake->psa_pake_ctx_is_ok = 1;
|
||||||
|
|
||||||
return PSA_SUCCESS;
|
return PSA_SUCCESS;
|
||||||
|
Reference in New Issue
Block a user