mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
mbedtls_mpi_core_get_mont_R2_unsafe: Removed NULL input checking
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
This commit is contained in:
@ -4,7 +4,6 @@
|
||||
#include "mbedtls/entropy.h"
|
||||
#include "constant_time_internal.h"
|
||||
#include "test/constant_flow.h"
|
||||
#include "mbedtls/error.h"
|
||||
|
||||
#if MBEDTLS_MPI_MAX_BITS > 792
|
||||
#define MPI_MAX_BITS_LARGER_THAN_792
|
||||
@ -1424,13 +1423,6 @@ void mpi_core_get_mont_R2_unsafe_neg( )
|
||||
mbedtls_mpi_init( &RR );
|
||||
const char * n = "7ffffffffffffff1";
|
||||
|
||||
/* Test for NULL input pointers */
|
||||
TEST_EQUAL( MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED,
|
||||
mbedtls_mpi_core_get_mont_R2_unsafe( NULL, &N ) );
|
||||
|
||||
TEST_EQUAL( MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED,
|
||||
mbedtls_mpi_core_get_mont_R2_unsafe( &RR, NULL ) );
|
||||
|
||||
/* Test for zero divisor */
|
||||
TEST_EQUAL( MBEDTLS_ERR_MPI_DIVISION_BY_ZERO,
|
||||
mbedtls_mpi_core_get_mont_R2_unsafe( &RR, &N ) );
|
||||
|
Reference in New Issue
Block a user