diff --git a/src/conf.c b/src/conf.c index 7391d6f15..605069adf 100644 --- a/src/conf.c +++ b/src/conf.c @@ -338,13 +338,12 @@ static unsigned long wolfSSL_CONF_VALUE_hash(const WOLFSSL_CONF_VALUE *val) unsigned long wolfSSL_LH_strhash(const char *str) { unsigned long ret = 0; + int strLen; #if !defined(NO_SHA) wc_Sha sha; - int strLen; byte digest[WC_SHA_DIGEST_SIZE]; #elif !defined(NO_SHA256) wc_Sha256 sha; - int strLen; byte digest[WC_SHA256_DIGEST_SIZE]; #endif WOLFSSL_ENTER("wolfSSL_LH_strhash"); diff --git a/tests/api.c b/tests/api.c index 6273b5287..99f9ab1f8 100644 --- a/tests/api.c +++ b/tests/api.c @@ -20334,7 +20334,7 @@ static int test_wc_RsaPublicEncryptDecrypt_ex(void) int result = TEST_SKIPPED; #if !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN) && !defined(HAVE_FIPS)\ && !defined(WC_NO_RSA_OAEP) && !defined(HAVE_USER_RSA)\ - && !defined(NO_SHA) + && !defined(NO_SHA256) RsaKey key; WC_RNG rng; int ret; @@ -20372,7 +20372,7 @@ static int test_wc_RsaPublicEncryptDecrypt_ex(void) /* Encrypt */ if (ret == 0) { ret = wc_RsaPublicEncrypt_ex(in, inLen, cipher, cipherSz, &key, &rng, - WC_RSA_OAEP_PAD, WC_HASH_TYPE_SHA256, WC_MGF1SHA1, NULL, 0); + WC_RSA_OAEP_PAD, WC_HASH_TYPE_SHA256, WC_MGF1SHA256, NULL, 0); if (ret >= 0) { idx = ret; ret = 0; @@ -20398,7 +20398,7 @@ static int test_wc_RsaPublicEncryptDecrypt_ex(void) if (ret == 0) { ret = wc_RsaPrivateDecrypt_ex(cipher, (word32)idx, plain, plainSz, &key, WC_RSA_OAEP_PAD, WC_HASH_TYPE_SHA256, - WC_MGF1SHA1, NULL, 0); + WC_MGF1SHA256, NULL, 0); } if (ret >= 0) { if (!XMEMCMP(plain, inStr, plainSz)) { @@ -20418,7 +20418,7 @@ static int test_wc_RsaPublicEncryptDecrypt_ex(void) if (ret == 0) { ret = wc_RsaPrivateDecryptInline_ex(cipher, (word32)idx, &res, &key, WC_RSA_OAEP_PAD, WC_HASH_TYPE_SHA256, - WC_MGF1SHA1, NULL, 0); + WC_MGF1SHA256, NULL, 0); if (ret >= 0) { if (!XMEMCMP(inStr, res, plainSz)) {