From 51d638baf6a9081c2a42c845f24cd3591c1c84c5 Mon Sep 17 00:00:00 2001 From: Minos Galanakis Date: Mon, 24 Oct 2022 09:59:44 +0100 Subject: [PATCH] bignum_core: Style update 'mbedtls_mpi_core_get_mont_R2_unsafe' aligns const keyword to match the style of the rest of the module. Documentation is also updated to remove `MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED`. Signed-off-by: Minos Galanakis --- library/bignum_core.c | 2 +- library/bignum_core.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/library/bignum_core.c b/library/bignum_core.c index ad22a1542a..675eb3070f 100644 --- a/library/bignum_core.c +++ b/library/bignum_core.c @@ -512,7 +512,7 @@ void mbedtls_mpi_core_montmul( mbedtls_mpi_uint *X, } int mbedtls_mpi_core_get_mont_R2_unsafe( mbedtls_mpi *X, - mbedtls_mpi const *N ) + const mbedtls_mpi *N ) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; diff --git a/library/bignum_core.h b/library/bignum_core.h index 9870da41f1..f3d460929a 100644 --- a/library/bignum_core.h +++ b/library/bignum_core.h @@ -426,9 +426,8 @@ void mbedtls_mpi_core_montmul( mbedtls_mpi_uint *X, * to store the value of Montgomery constant squared. * \return #MBEDTLS_ERR_MPI_DIVISION_BY_ZERO if \p N modulus is zero. * \return #MBEDTLS_ERR_MPI_NEGATIVE_VALUE if \p N modulus is negative. - * \return #MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED if other operations fail. */ int mbedtls_mpi_core_get_mont_R2_unsafe( mbedtls_mpi *X, - mbedtls_mpi const *N ); + const mbedtls_mpi *N ); #endif /* MBEDTLS_BIGNUM_CORE_H */