wolfcrypt: fix several redefinition of typedef errors.

This commit is contained in:
jordan
2026-07-06 23:49:14 -05:00
parent 675d5df2cd
commit e6e8d9c7e2
4 changed files with 19 additions and 4 deletions
+3
View File
@@ -299,7 +299,10 @@ wc_static_assert(SLHDSA_MAX_MSG_SZ <= 255);
*/
/* HashAddress type. */
#ifndef WC_HASHADDRESS_TYPE_DEFINED
typedef word32 HashAddress[8];
#define WC_HASHADDRESS_TYPE_DEFINED
#endif
/* Encode a HashAddress.
*
+6 -2
View File
@@ -362,7 +362,7 @@ enum {
#define MLKEM_PRF_T wc_Shake
/* ML-KEM key. */
typedef struct MlKemKey {
struct MlKemKey {
/* Type of key: WC_ML_KEM_512, WC_ML_KEM_768, WC_ML_KEM_1024 */
int type;
#ifdef WOLFSSL_MLKEM_DYNAMIC_KEYS
@@ -418,8 +418,12 @@ typedef struct MlKemKey {
sword16* a;
#endif
#endif
} MlKemKey;
};
#ifndef WC_MLKEMKEY_TYPE_DEFINED
typedef struct MlKemKey MlKemKey;
#define WC_MLKEMKEY_TYPE_DEFINED
#endif
WOLFSSL_API MlKemKey* wc_MlKemKey_New(int type, void* heap, int devId);
WOLFSSL_API int wc_MlKemKey_Delete(MlKemKey* key, MlKemKey** key_p);
+7 -2
View File
@@ -601,7 +601,7 @@ typedef struct SlhDsaParameters {
#endif
/* SLH-DSA key data and state. */
typedef struct SlhDsaKey {
struct SlhDsaKey {
/* Parameters. */
const SlhDsaParameters* params;
/* Flags of the key. */
@@ -654,7 +654,12 @@ typedef struct SlhDsaKey {
} sha2;
#endif
} hash;
} SlhDsaKey;
};
#ifndef WC_SLHDSAKEY_TYPE_DEFINED
typedef struct SlhDsaKey SlhDsaKey;
#define WC_SLHDSAKEY_TYPE_DEFINED
#endif
WOLFSSL_API int wc_SlhDsaKey_Init(SlhDsaKey* key, enum SlhDsaParam param,
void* heap, int devId);
+3
View File
@@ -307,7 +307,10 @@ typedef enum wc_XmssRc (*wc_xmss_read_private_key_cb)(byte* priv, word32 privSz,
/* Type for hash address. */
#ifndef WC_HASHADDRESS_TYPE_DEFINED
typedef word32 HashAddress[8];
#define WC_HASHADDRESS_TYPE_DEFINED
#endif
/* XMSS/XMSS^MT fixed parameters. */
typedef struct XmssParams {