diff --git a/wolfcrypt/src/coding.c b/wolfcrypt/src/coding.c index 4ec742ec7..3aa59f0f3 100644 --- a/wolfcrypt/src/coding.c +++ b/wolfcrypt/src/coding.c @@ -42,6 +42,8 @@ enum { }; +#ifdef WOLFSSL_BASE64_DECODE + static const byte base64Decode[] = { 62, BAD, BAD, BAD, 63, /* + starts at 0x2B */ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, @@ -144,6 +146,7 @@ int Base64_Decode(const byte* in, word32 inLen, byte* out, word32* outLen) return 0; } +#endif /* WOLFSSL_BASE64_DECODE */ #if defined(WOLFSSL_BASE64_ENCODE) diff --git a/wolfcrypt/src/hash.c b/wolfcrypt/src/hash.c index 4286af08e..0dc0ba2c5 100644 --- a/wolfcrypt/src/hash.c +++ b/wolfcrypt/src/hash.c @@ -58,6 +58,7 @@ enum Hash_Sum { }; #endif /* !NO_ASN */ +#if !defined(NO_PWDBASED) || !defined(NO_ASN) /* function converts int hash type to enum */ enum wc_HashType wc_HashTypeConvert(int hashType) { @@ -126,6 +127,7 @@ enum wc_HashType wc_HashTypeConvert(int hashType) #endif return eHashType; } +#endif /* !NO_PWDBASED || !NO_ASN */ #if !defined(NO_ASN) || !defined(NO_DH) || defined(HAVE_ECC) @@ -264,7 +266,7 @@ enum wc_HashType wc_OidGetHash(int oid) } #endif /* !NO_ASN || !NO_DH || HAVE_ECC */ - +#ifndef NO_HASH_WRAPPER /* Get Hash digest size */ int wc_HashGetDigestSize(enum wc_HashType hash_type) @@ -1362,6 +1364,8 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags) #endif /* !WOLFSSL_NOSHA3_512 */ #endif /* WOLFSSL_SHA3 */ +#endif /* !NO_HASH_WRAPPER */ + #ifdef WOLFSSL_HAVE_PRF #ifdef WOLFSSL_SHA384 diff --git a/wolfssl/wolfcrypt/settings.h b/wolfssl/wolfcrypt/settings.h index b7beae382..39472abdc 100644 --- a/wolfssl/wolfcrypt/settings.h +++ b/wolfssl/wolfcrypt/settings.h @@ -2105,6 +2105,11 @@ extern void uITRON4_free(void *p) ; #error TLS 1.3 requires the Signature Algorithms extension to be enabled #endif +#ifndef NO_WOLFSSL_BASE64_DECODE + #define WOLFSSL_BASE64_DECODE +#endif + + #ifdef __cplusplus } /* extern "C" */ #endif