add test-case that uses LTC_NO_NULL_TERMINATION_CHECK

It's a compile-only test, but we run it anyways so we can finally get
`crypt_fsa()` included in the coverage report. It's not really useful but
also doesn't hurt.

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
This commit is contained in:
Steffen Jaeckel 2022-09-01 12:28:17 +02:00
parent 6ab01a8e8f
commit 13dc1f4fa2
3 changed files with 14 additions and 0 deletions

View file

@ -34,5 +34,6 @@ int misc_test(void)
#ifdef LTC_SSH
ssh_test();
#endif
no_null_termination_check_test();
return 0;
}

View file

@ -0,0 +1,12 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#define LTC_NO_NULL_TERMINATION_CHECK
#include "tomcrypt.h"
#define NNTCT_NULL ((void *)0)
int no_null_termination_check_test(void)
{
return crypt_fsa(NNTCT_NULL, NNTCT_NULL, NNTCT_NULL, NNTCT_NULL, NNTCT_NULL, NNTCT_NULL, 0);
}

View file

@ -42,6 +42,7 @@ int x25519_test(void);
int ed25519_test(void);
int ssh_test(void);
int bcrypt_test(void);
int no_null_termination_check_test(void);
#ifdef LTC_PKCS_1
struct ltc_prng_descriptor* no_prng_desc_get(void);