mirror of
https://github.com/libtom/libtomcrypt
synced 2026-08-25 20:26:07 -04:00
Fix build with -DLTC_MINIMAL.
Fixes: 661109f660 ("re-factor modes to use internal ECB implementation")
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
This commit is contained in:
parent
e2544d4071
commit
e5df4f7ce8
4 changed files with 17 additions and 1 deletions
|
|
@ -126,6 +126,7 @@
|
|||
#define LTC_RIJNDAEL
|
||||
#define LTC_SHA256
|
||||
#define LTC_YARROW
|
||||
#define LTC_ECB_MODE
|
||||
#define LTC_CTR_MODE
|
||||
|
||||
#define LTC_RNG_MAKE_PRNG
|
||||
|
|
|
|||
|
|
@ -2098,5 +2098,9 @@ int ecc_test(void)
|
|||
#endif
|
||||
return CRYPT_OK;
|
||||
}
|
||||
|
||||
#else
|
||||
int ecc_test(void)
|
||||
{
|
||||
return CRYPT_NOP;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -28,6 +28,10 @@ int file_test(void)
|
|||
isha256 = find_hash("sha256");
|
||||
iaes = find_cipher("aes");
|
||||
|
||||
/* Suppress warnings when building with -DLTC_MINIMAL */
|
||||
LTC_UNUSED_PARAM(iaes);
|
||||
LTC_UNUSED_PARAM(key);
|
||||
|
||||
len = sizeof(buf);
|
||||
if ((in = fopen(fname, "rb")) == NULL) return CRYPT_FILE_NOTFOUND;
|
||||
err = hash_filehandle(isha256, in, buf, &len);
|
||||
|
|
|
|||
|
|
@ -9,10 +9,16 @@ int multi_test(void)
|
|||
unsigned char buf[2][MAXBLOCKSIZE];
|
||||
unsigned long len, len2;
|
||||
|
||||
/* Suppress warnings when building with -DLTC_MINIMAL */
|
||||
LTC_UNUSED_PARAM(key);
|
||||
LTC_UNUSED_PARAM(buf);
|
||||
LTC_UNUSED_PARAM(len);
|
||||
LTC_UNUSED_PARAM(len2);
|
||||
/* register algos */
|
||||
register_hash(&sha256_desc);
|
||||
register_cipher(&aes_desc);
|
||||
|
||||
#ifdef LTC_HASH_HELPERS
|
||||
/* HASH testing */
|
||||
len = sizeof(buf[0]);
|
||||
#if defined(ENDIAN_32BITWORD) || defined(_WIN32) || defined(ENDIAN_64BITWORD_ILP32)
|
||||
|
|
@ -43,6 +49,7 @@ int multi_test(void)
|
|||
printf("Failed: %d %lu %lu\n", __LINE__, len, len2);
|
||||
return CRYPT_FAIL_TESTVECTOR;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef LTC_HMAC
|
||||
len = sizeof(buf[0]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue