From 781f7bedb0a3c9d7d99c5d71a9dfac61966249d6 Mon Sep 17 00:00:00 2001 From: Raef Coles Date: Thu, 13 Oct 2022 09:23:11 +0100 Subject: [PATCH] Properly mark LMOTS leak test as failed Signed-off-by: Raef Coles --- tests/suites/test_suite_lmots.function | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/suites/test_suite_lmots.function b/tests/suites/test_suite_lmots.function index 4382421d0..c582ce700 100644 --- a/tests/suites/test_suite_lmots.function +++ b/tests/suites/test_suite_lmots.function @@ -11,12 +11,13 @@ int check_lmots_private_key_for_leak(unsigned char * sig) idx < MBEDTLS_LMOTS_SIG_LEN(MBEDTLS_LMOTS_SHA256_N32_W8); idx++ ) { - if( sig[idx] != 0x7E ) { - return 1; - } + TEST_EQUAL( sig[idx], 0x7E ); } - return 0; + return( 0 ); + +exit: + return( -1 ); } #endif /* defined(MBEDTLS_TEST_HOOKS) */