Check correct output size in LMOTS export test

Signed-off-by: Raef Coles <raef.coles@arm.com>
This commit is contained in:
Raef Coles 2022-10-13 15:43:07 +01:00
parent ed0e4591dc
commit 493724e3c2
No known key found for this signature in database
GPG Key ID: 1AAF1B43DF2086F4

View File

@ -162,7 +162,7 @@ void lmots_import_export_test ( data_t * pub_key, int expected_import_rc )
exported_pub_key_buf_size,
&exported_pub_key_size ), 0 );
TEST_EQUAL( exported_pub_key_buf_size,
TEST_EQUAL( exported_pub_key_size,
MBEDTLS_LMOTS_PUBLIC_KEY_LEN(MBEDTLS_LMOTS_SHA256_N32_W8) );
ASSERT_COMPARE( pub_key->x, pub_key->len,
exported_pub_key, exported_pub_key_size );
@ -184,7 +184,7 @@ void lmots_import_export_test ( data_t * pub_key, int expected_import_rc )
TEST_EQUAL( mbedtls_lmots_export_public_key( &ctx, exported_pub_key,
exported_pub_key_buf_size, NULL ),
0 );
TEST_EQUAL( exported_pub_key_buf_size,
TEST_EQUAL( exported_pub_key_size,
MBEDTLS_LMOTS_PUBLIC_KEY_LEN(MBEDTLS_LMOTS_SHA256_N32_W8) );
ASSERT_COMPARE( pub_key->x, pub_key->len,
exported_pub_key, exported_pub_key_size );