Properly mark LMOTS leak test as failed

Signed-off-by: Raef Coles <raef.coles@arm.com>
This commit is contained in:
Raef Coles 2022-10-13 09:23:11 +01:00
parent d137c86125
commit 781f7bedb0
No known key found for this signature in database
GPG Key ID: 1AAF1B43DF2086F4

View File

@ -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 < MBEDTLS_LMOTS_SIG_LEN(MBEDTLS_LMOTS_SHA256_N32_W8);
idx++ ) idx++ )
{ {
if( sig[idx] != 0x7E ) { TEST_EQUAL( sig[idx], 0x7E );
return 1;
}
} }
return 0; return( 0 );
exit:
return( -1 );
} }
#endif /* defined(MBEDTLS_TEST_HOOKS) */ #endif /* defined(MBEDTLS_TEST_HOOKS) */