From 8ca8827b583eff3b3987fe99be7e98dd8cdf64a9 Mon Sep 17 00:00:00 2001 From: kaleb-himes Date: Wed, 12 Jun 2024 10:10:37 -0400 Subject: [PATCH] Isolate forward declaration of Gmac --- wolfssl/wolfcrypt/aes.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/wolfssl/wolfcrypt/aes.h b/wolfssl/wolfcrypt/aes.h index 7cc786e72b..46687dade9 100644 --- a/wolfssl/wolfcrypt/aes.h +++ b/wolfssl/wolfcrypt/aes.h @@ -401,9 +401,6 @@ struct Aes { #ifndef WC_AES_TYPE_DEFINED typedef struct Aes Aes; - #ifdef HAVE_AESGCM - typedef struct Gmac Gmac; - #endif #define WC_AES_TYPE_DEFINED #endif @@ -463,6 +460,12 @@ struct Aes { struct Gmac { Aes aes; }; + +#ifndef WC_AESGCM_TYPE_DEFINED + typedef struct Gmac Gmac; + #define WC_AESGCM_TYPE_DEFINED +#endif + #endif /* HAVE_AESGCM */ #endif /* HAVE_FIPS */