diff --git a/library/ssl_misc.h b/library/ssl_misc.h index 0f43a18f4..2ff7e0c22 100644 --- a/library/ssl_misc.h +++ b/library/ssl_misc.h @@ -2367,17 +2367,6 @@ static inline int psa_ssl_status_to_mbedtls( psa_status_t status ) #if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) && \ defined(MBEDTLS_USE_PSA_CRYPTO) -/* Currently JPAKE only supports elliptic curve secp256r1 */ -#define MBEDTLS_SSL_ECJPAKE_PSA_PRIMITIVE \ - PSA_PAKE_PRIMITIVE( PSA_PAKE_PRIMITIVE_TYPE_ECC, \ - PSA_ECC_FAMILY_SECP_R1, 256 ) - -/* Expected output data size for each "step" of EC-JPAKE key echange */ -#define MBEDTLS_SSL_ECJPAKE_OUTPUT_SIZE( step ) \ - PSA_PAKE_OUTPUT_SIZE( PSA_ALG_JPAKE, \ - MBEDTLS_SSL_ECJPAKE_PSA_PRIMITIVE, \ - step ) - typedef enum { MBEDTLS_ECJPAKE_ROUND_ONE, MBEDTLS_ECJPAKE_ROUND_TWO diff --git a/library/ssl_tls.c b/library/ssl_tls.c index 7b51040c4..5bfdde7bc 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -8260,13 +8260,8 @@ int mbedtls_psa_ecjpake_write_round( ++step ) { /* - * For each step, prepend 1 byte with the length of the data. - * - * NOTE = psa_pake_output() sometimes output elements which are - * NOT 32 or 65 bytes as expected, but 1 byte less. So, instead - * of hardcoding the expected length, we - * - get the output first - * - then write the length of this output + * For each step, prepend 1 byte with the length of the data as + * given by psa_pake_output(). */ status = psa_pake_output( pake_ctx, step, buf + output_offset + 1,