mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-02 07:20:26 +00:00
Remove VALIDATE macros from bignum_core.c
They are deprecated and are declared to be empty anyway. Signed-off-by: Janos Follath <janos.follath@arm.com>
This commit is contained in:
parent
d1baedb786
commit
c47c0569d4
@ -38,11 +38,6 @@
|
|||||||
|
|
||||||
#include "bignum_core.h"
|
#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 ciL (sizeof(mbedtls_mpi_uint)) /* chars in limb */
|
||||||
#define biL (ciL << 3) /* bits in limb */
|
#define biL (ciL << 3) /* bits in limb */
|
||||||
#define biH (ciL << 2) /* half limb size */
|
#define biH (ciL << 2) /* half limb size */
|
||||||
@ -239,9 +234,6 @@ int mbedtls_mpi_core_read_be( mbedtls_mpi_uint *X,
|
|||||||
size_t overhead;
|
size_t overhead;
|
||||||
unsigned char *Xp;
|
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 */
|
/* Ensure that target MPI has at least the necessary number of limbs */
|
||||||
MBEDTLS_MPI_CHK( mpi_core_clear( X, nx, 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;
|
unsigned char *p;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
MPI_VALIDATE_RET( X != NULL );
|
|
||||||
MPI_VALIDATE_RET( buflen == 0 || buf != NULL );
|
|
||||||
|
|
||||||
stored_bytes = nx * ciL;
|
stored_bytes = nx * ciL;
|
||||||
|
|
||||||
if( stored_bytes < buflen )
|
if( stored_bytes < buflen )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user