diff --git a/include/mbedtls/ecjpake.h b/include/mbedtls/ecjpake.h index a63bb32f38..94864faeaf 100644 --- a/include/mbedtls/ecjpake.h +++ b/include/mbedtls/ecjpake.h @@ -52,7 +52,8 @@ extern "C" { * Roles in the EC J-PAKE exchange */ typedef enum { - MBEDTLS_ECJPAKE_CLIENT = 0, /**< Client */ + MBEDTLS_ECJPAKE_NONE = 0, /**< Undefined */ + MBEDTLS_ECJPAKE_CLIENT, /**< Client */ MBEDTLS_ECJPAKE_SERVER, /**< Server */ } mbedtls_ecjpake_role; diff --git a/library/psa_crypto_pake.c b/library/psa_crypto_pake.c index 97aafb457c..d9b2ecd9ad 100644 --- a/library/psa_crypto_pake.c +++ b/library/psa_crypto_pake.c @@ -594,7 +594,7 @@ psa_status_t mbedtls_psa_pake_abort(mbedtls_psa_pake_operation_t *operation) #if defined(MBEDTLS_PSA_BUILTIN_ALG_JPAKE) if (operation->alg == PSA_ALG_JPAKE) { - operation->role = 0; + operation->role = MBEDTLS_ECJPAKE_NONE; mbedtls_platform_zeroize(operation->buffer, sizeof(operation->buffer)); operation->buffer_length = 0; operation->buffer_offset = 0;