diff --git a/src/internal.c b/src/internal.c index 3962aa117..bc65a2ff7 100644 --- a/src/internal.c +++ b/src/internal.c @@ -11830,6 +11830,8 @@ static int ChachaAEADDecrypt(WOLFSSL* ssl, byte* plain, const byte* input, #endif /* HAVE_AEAD */ +#if defined(BUILD_AESGCM) || defined(HAVE_AESCCM) + #if (!defined(HAVE_FIPS) && !defined(HAVE_SELFTEST)) || \ (defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION >= 2)) /* The following type is used to share code between AES-GCM and AES-CCM. */ @@ -11847,6 +11849,8 @@ static int ChachaAEADDecrypt(WOLFSSL* ssl, byte* plain, const byte* input, #define AES_CCM_ENCRYPT wc_AesCcmEncrypt #endif +#endif + static WC_INLINE int EncryptDo(WOLFSSL* ssl, byte* out, const byte* input, word16 sz, int asyncOkay)