Fix assert arguments in LMS and LMOTS export tests
Signed-off-by: Raef Coles <raef.coles@arm.com>
This commit is contained in:
parent
d1c2a80319
commit
534f66f3f0
2 changed files with 8 additions and 6 deletions
|
@ -163,9 +163,10 @@ 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, exported_pub_key_size );
|
||||
ASSERT_COMPARE( pub_key->x, MBEDTLS_LMOTS_PUBLIC_KEY_LEN(MBEDTLS_LMOTS_SHA256_N32_W8),
|
||||
exported_pub_key, MBEDTLS_LMOTS_PUBLIC_KEY_LEN(MBEDTLS_LMOTS_SHA256_N32_W8) );
|
||||
TEST_EQUAL( exported_pub_key_buf_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 );
|
||||
mbedtls_free(exported_pub_key);
|
||||
exported_pub_key = NULL;
|
||||
|
||||
|
|
|
@ -165,9 +165,10 @@ void lms_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, exported_pub_key_size );
|
||||
ASSERT_COMPARE( pub_key->x, MBEDTLS_LMS_PUBLIC_KEY_LEN(MBEDTLS_LMS_SHA256_M32_H10),
|
||||
exported_pub_key, MBEDTLS_LMS_PUBLIC_KEY_LEN(MBEDTLS_LMS_SHA256_M32_H10) );
|
||||
TEST_EQUAL( exported_pub_key_size,
|
||||
MBEDTLS_LMS_PUBLIC_KEY_LEN(MBEDTLS_LMS_SHA256_M32_H10 ) );
|
||||
ASSERT_COMPARE( pub_key->x, pub_key->len,
|
||||
exported_pub_key, exported_pub_key_size );
|
||||
mbedtls_free(exported_pub_key);
|
||||
exported_pub_key = NULL;
|
||||
|
||||
|
|
Loading…
Reference in a new issue