mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-26 03:35:35 +00:00
Replace TEST_ASSERT with TEST_EQUAL in LMS tests
Signed-off-by: Raef Coles <raef.coles@arm.com>
This commit is contained in:
parent
f9b8502865
commit
d0c701237a
@ -27,16 +27,16 @@ void lms_sign_verify_test ( data_t *msg, data_t *seed )
|
||||
mbedtls_test_rnd_std_rand, NULL,
|
||||
seed->x, seed->len );
|
||||
TEST_ASSUME( rc != MBEDTLS_ERR_LMS_ALLOC_FAILED );
|
||||
TEST_ASSERT( rc == 0 );
|
||||
TEST_EQUAL( rc, 0 );
|
||||
|
||||
TEST_ASSERT( mbedtls_lms_calculate_public_key( &pub_ctx, &priv_ctx ) == 0 );
|
||||
TEST_EQUAL( mbedtls_lms_calculate_public_key( &pub_ctx, &priv_ctx ), 0 );
|
||||
|
||||
TEST_ASSERT( mbedtls_lms_sign( &priv_ctx, mbedtls_test_rnd_std_rand, NULL,
|
||||
TEST_EQUAL( mbedtls_lms_sign( &priv_ctx, mbedtls_test_rnd_std_rand, NULL,
|
||||
msg->x, msg->len, sig, sizeof( sig ),
|
||||
NULL ) == 0 );
|
||||
NULL ), 0 );
|
||||
|
||||
TEST_ASSERT( mbedtls_lms_verify( &pub_ctx, msg->x, msg->len, sig,
|
||||
sizeof( sig ) ) == 0 );
|
||||
TEST_EQUAL( mbedtls_lms_verify( &pub_ctx, msg->x, msg->len, sig,
|
||||
sizeof( sig ) ), 0 );
|
||||
|
||||
exit:
|
||||
mbedtls_lms_public_free( &pub_ctx );
|
||||
@ -63,16 +63,16 @@ void lms_sign_verify_null_msg_test( data_t *seed )
|
||||
mbedtls_test_rnd_std_rand, NULL,
|
||||
seed->x, seed->len );
|
||||
TEST_ASSUME( rc != MBEDTLS_ERR_LMS_ALLOC_FAILED );
|
||||
TEST_ASSERT( rc == 0 );
|
||||
TEST_EQUAL( rc, 0 );
|
||||
|
||||
TEST_ASSERT( mbedtls_lms_calculate_public_key( &pub_ctx, &priv_ctx ) == 0 );
|
||||
TEST_EQUAL( mbedtls_lms_calculate_public_key( &pub_ctx, &priv_ctx ), 0 );
|
||||
|
||||
TEST_ASSERT( mbedtls_lms_sign( &priv_ctx, mbedtls_test_rnd_std_rand, NULL,
|
||||
TEST_EQUAL( mbedtls_lms_sign( &priv_ctx, mbedtls_test_rnd_std_rand, NULL,
|
||||
NULL, 0, sig, sizeof( sig ),
|
||||
NULL ) == 0 );
|
||||
NULL ), 0 );
|
||||
|
||||
TEST_ASSERT( mbedtls_lms_verify( &pub_ctx, NULL, 0, sig,
|
||||
sizeof( sig ) ) == 0 );
|
||||
TEST_EQUAL( mbedtls_lms_verify( &pub_ctx, NULL, 0, sig,
|
||||
sizeof( sig ) ), 0 );
|
||||
|
||||
exit:
|
||||
mbedtls_lms_public_free( &pub_ctx );
|
||||
|
Loading…
x
Reference in New Issue
Block a user