mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
tests: Reformating due to rnd_* renaming
Command to find the files in which lines have gone larger than 79 characters due to the renaming: grep '.\{80\}' \ `git diff-tree --no-commit-id --name-only -r HEAD` \ | grep "\<mbedtls_test_rnd_" Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
@ -240,7 +240,8 @@ void mpi_invalid_param( )
|
||||
mbedtls_mpi_exp_mod( &X, &X, &X, NULL, NULL ) );
|
||||
|
||||
TEST_INVALID_PARAM_RET( MBEDTLS_ERR_MPI_BAD_INPUT_DATA,
|
||||
mbedtls_mpi_fill_random( NULL, 42, mbedtls_test_rnd_std_rand,
|
||||
mbedtls_mpi_fill_random( NULL, 42,
|
||||
mbedtls_test_rnd_std_rand,
|
||||
NULL ) );
|
||||
TEST_INVALID_PARAM_RET( MBEDTLS_ERR_MPI_BAD_INPUT_DATA,
|
||||
mbedtls_mpi_fill_random( &X, 42, NULL, NULL ) );
|
||||
@ -1244,7 +1245,8 @@ void mbedtls_mpi_gen_prime( int bits, int flags, int ref_ret )
|
||||
|
||||
mbedtls_mpi_init( &X );
|
||||
|
||||
my_ret = mbedtls_mpi_gen_prime( &X, bits, flags, mbedtls_test_rnd_std_rand, NULL );
|
||||
my_ret = mbedtls_mpi_gen_prime( &X, bits, flags,
|
||||
mbedtls_test_rnd_std_rand, NULL );
|
||||
TEST_ASSERT( my_ret == ref_ret );
|
||||
|
||||
if( ref_ret == 0 )
|
||||
@ -1254,14 +1256,16 @@ void mbedtls_mpi_gen_prime( int bits, int flags, int ref_ret )
|
||||
TEST_ASSERT( actual_bits >= (size_t) bits );
|
||||
TEST_ASSERT( actual_bits <= (size_t) bits + 1 );
|
||||
|
||||
TEST_ASSERT( mbedtls_mpi_is_prime_ext( &X, 40, mbedtls_test_rnd_std_rand, NULL )
|
||||
== 0 );
|
||||
TEST_ASSERT( mbedtls_mpi_is_prime_ext( &X, 40,
|
||||
mbedtls_test_rnd_std_rand,
|
||||
NULL ) == 0 );
|
||||
if( flags & MBEDTLS_MPI_GEN_PRIME_FLAG_DH )
|
||||
{
|
||||
/* X = ( X - 1 ) / 2 */
|
||||
TEST_ASSERT( mbedtls_mpi_shift_r( &X, 1 ) == 0 );
|
||||
TEST_ASSERT( mbedtls_mpi_is_prime_ext( &X, 40, mbedtls_test_rnd_std_rand, NULL )
|
||||
== 0 );
|
||||
TEST_ASSERT( mbedtls_mpi_is_prime_ext( &X, 40,
|
||||
mbedtls_test_rnd_std_rand,
|
||||
NULL ) == 0 );
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user