From c47c0569d40303813d5987b2f3dc3eb081f19903 Mon Sep 17 00:00:00 2001 From: Janos Follath Date: Tue, 9 Aug 2022 13:54:43 +0100 Subject: [PATCH] Remove VALIDATE macros from bignum_core.c They are deprecated and are declared to be empty anyway. Signed-off-by: Janos Follath --- library/bignum_core.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/library/bignum_core.c b/library/bignum_core.c index 35173b9e7b..3c083a4389 100644 --- a/library/bignum_core.c +++ b/library/bignum_core.c @@ -38,11 +38,6 @@ #include "bignum_core.h" -#define MPI_VALIDATE_RET( cond ) \ - MBEDTLS_INTERNAL_VALIDATE_RET( cond, MBEDTLS_ERR_MPI_BAD_INPUT_DATA ) -#define MPI_VALIDATE( cond ) \ - MBEDTLS_INTERNAL_VALIDATE( cond ) - #define ciL (sizeof(mbedtls_mpi_uint)) /* chars in limb */ #define biL (ciL << 3) /* bits in limb */ #define biH (ciL << 2) /* half limb size */ @@ -239,9 +234,6 @@ int mbedtls_mpi_core_read_be( mbedtls_mpi_uint *X, size_t overhead; unsigned char *Xp; - MPI_VALIDATE_RET( X != NULL ); - MPI_VALIDATE_RET( buflen == 0 || buf != NULL ); - /* Ensure that target MPI has at least the necessary number of limbs */ MBEDTLS_MPI_CHK( mpi_core_clear( X, nx, limbs ) ); @@ -315,9 +307,6 @@ int mbedtls_mpi_core_write_be( const mbedtls_mpi_uint *X, unsigned char *p; size_t i; - MPI_VALIDATE_RET( X != NULL ); - MPI_VALIDATE_RET( buflen == 0 || buf != NULL ); - stored_bytes = nx * ciL; if( stored_bytes < buflen )