From 1283325f65a01701dfdf0956cbcedd7c4bc40cc7 Mon Sep 17 00:00:00 2001 From: Brett Nicholas <7547222+bigbrett@users.noreply.github.com> Date: Thu, 21 Nov 2024 14:10:11 -0800 Subject: [PATCH] wolfhsm-mldsa-fixes --- wolfssl/wolfcrypt/asn.h | 9 ++++++--- wolfssl/wolfcrypt/cryptocb.h | 3 +++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/wolfssl/wolfcrypt/asn.h b/wolfssl/wolfcrypt/asn.h index 834e3487c..ba9b96966 100644 --- a/wolfssl/wolfcrypt/asn.h +++ b/wolfssl/wolfcrypt/asn.h @@ -1620,7 +1620,8 @@ struct SignatureCtx { byte* sigCpy; #endif #if defined(HAVE_ECC) || defined(HAVE_ED25519) || defined(HAVE_ED448) || \ - !defined(NO_DSA) + !defined(NO_DSA) || defined(HAVE_DILITHIUM) || defined(HAVE_FALCON) || \ + defined(HAVE_SPHINCS) int verify; #endif union { @@ -1898,12 +1899,14 @@ struct DecodedCert { #endif #endif /* WOLFSSL_SUBJ_INFO_ACC */ -#if defined(HAVE_ECC) || defined(HAVE_ED25519) || defined(HAVE_ED448) +#if defined(HAVE_ECC) || defined(HAVE_ED25519) || defined(HAVE_ED448) || \ + defined(HAVE_DILITHIUM) || defined(HAVE_FALCON) || defined(HAVE_SPHINCS) word32 pkCurveOID; /* Public Key's curve OID */ #ifdef WOLFSSL_CUSTOM_CURVES int pkCurveSize; /* Public Key's curve size */ #endif -#endif /* HAVE_ECC */ +#endif /* HAVE_ECC || HAVE_ED25519 || HAVE_ED448 || HAVE_DILITHIUM || + * HAVE_FALCON || HAVE_SPHINCS */ const byte* beforeDate; int beforeDateLen; const byte* afterDate; diff --git a/wolfssl/wolfcrypt/cryptocb.h b/wolfssl/wolfcrypt/cryptocb.h index 4ec42ecbb..93330f359 100644 --- a/wolfssl/wolfcrypt/cryptocb.h +++ b/wolfssl/wolfcrypt/cryptocb.h @@ -50,6 +50,9 @@ #ifndef NO_SHA256 #include #endif +#ifdef WOLFSSL_SHA3 + #include +#endif #ifndef NO_HMAC #include #endif