diff --git a/library/bignum_core.c b/library/bignum_core.c index 35173b9e7..3c083a438 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 )