mirror of
https://github.com/libtom/libtomcrypt
synced 2026-08-25 20:26:07 -04:00
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:
parent
6ab01a8e8f
commit
13dc1f4fa2
3 changed files with 14 additions and 0 deletions
|
|
@ -34,5 +34,6 @@ int misc_test(void)
|
|||
#ifdef LTC_SSH
|
||||
ssh_test();
|
||||
#endif
|
||||
no_null_termination_check_test();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
12
tests/no_null_termination_check_test.c
Normal file
12
tests/no_null_termination_check_test.c
Normal 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);
|
||||
}
|
||||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue