mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
Added if defined cases for tests using hashes
This commit is contained in:
18
tests/api.c
18
tests/api.c
@ -6428,7 +6428,8 @@ static int test_wc_Sha256Final (void)
|
||||
static int test_wc_Sha256FinalRaw (void)
|
||||
{
|
||||
int flag = 0;
|
||||
#ifndef NO_SHA256
|
||||
#if !defined(NO_SHA256) && \
|
||||
(defined(WOLFSSL_HASH_FLAGS) || defined(WOLF_CRYPTO_CB))
|
||||
wc_Sha256 sha256;
|
||||
byte* hash_test[3];
|
||||
byte hash1[WC_SHA256_DIGEST_SIZE];
|
||||
@ -6498,7 +6499,7 @@ static int test_wc_Sha256FinalRaw (void)
|
||||
static int test_wc_Sha256GetFlags (void)
|
||||
{
|
||||
int flag = 0;
|
||||
#if !defined(NO_SHA224) && \
|
||||
#if !defined(NO_SHA256) && \
|
||||
(defined(WOLFSSL_HASH_FLAGS) || defined(WOLF_CRYPTO_CB))
|
||||
wc_Sha256 sha256;
|
||||
word32 flags = 0;
|
||||
@ -7336,14 +7337,15 @@ static int test_wc_Sha224GetFlags (void)
|
||||
#endif
|
||||
return flag;
|
||||
|
||||
} /* END test_wc_Sha224Free */
|
||||
} /* END test_wc_Sha224GetFlags */
|
||||
/*
|
||||
* Unit test function for wc_Sha224GetFlags()
|
||||
* Unit test function for wc_Sha224Free()
|
||||
*/
|
||||
static int test_wc_Sha224Free (void)
|
||||
{
|
||||
int flag = 0;
|
||||
#ifndef NO_SHA224
|
||||
#if !defined(NO_SHA224) && \
|
||||
(defined(WOLFSSL_HASH_FLAGS) || defined(WOLF_CRYPTO_CB))
|
||||
|
||||
printf(testingFmt, "wc_Sha224Free()");
|
||||
wc_Sha224Free(NULL);
|
||||
@ -7361,7 +7363,8 @@ static int test_wc_Sha224Free (void)
|
||||
static int test_wc_Sha224GetHash (void)
|
||||
{
|
||||
int flag = 0;
|
||||
#ifndef NO_SHA224
|
||||
#if !defined(NO_SHA224) && \
|
||||
(defined(WOLFSSL_HASH_FLAGS) || defined(WOLF_CRYPTO_CB))
|
||||
wc_Sha224 sha224;
|
||||
byte hash1[WC_SHA224_DIGEST_SIZE];
|
||||
|
||||
@ -7407,7 +7410,8 @@ static int test_wc_Sha224GetHash (void)
|
||||
static int test_wc_Sha224Copy (void)
|
||||
{
|
||||
int flag = 0;
|
||||
#ifndef NO_SHA224
|
||||
#if !defined(NO_SHA224) && \
|
||||
(defined(WOLFSSL_HASH_FLAGS) || defined(WOLF_CRYPTO_CB))
|
||||
wc_Sha224 sha224;
|
||||
wc_Sha224 temp;
|
||||
|
||||
|
Reference in New Issue
Block a user