tls: psa_pake: remove useless defines and fix a comment
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
This commit is contained in:
parent
5151bdf46e
commit
d4a9b1ab8d
2 changed files with 2 additions and 18 deletions
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue