add missing gate around Sha256_SetTransform() declaration in wolfcrypt/src/sha256.c;

remove stray definitions of XTRANSFORM*() in wolfcrypt/src/sha512.c;

restore global intel_flags in the !WC_NO_INTERNAL_FUNCTION_POINTERS paths of sha256.c and sha512.c;

disable test_wolfSSL_dtls_compare_stateless() in tests/api.c when DEBUG_VECTOR_REGISTER_ACCESS_FUZZING (it depends on a stable SHA512 hash of the in-memory struct WOLFSSL image).
This commit is contained in:
Daniel Pouzzner
2024-04-27 12:33:20 -05:00
parent 0566584191
commit 885497ba5a
3 changed files with 8 additions and 3 deletions

View File

@@ -63548,7 +63548,8 @@ static int test_wolfSSL_dtls_AEAD_limit(void)
#endif #endif
#if defined(WOLFSSL_DTLS) && \ #if defined(WOLFSSL_DTLS) && \
defined(HAVE_IO_TESTS_DEPENDENCIES) && !defined(SINGLE_THREADED) defined(HAVE_IO_TESTS_DEPENDENCIES) && !defined(SINGLE_THREADED) && \
!defined(DEBUG_VECTOR_REGISTER_ACCESS_FUZZING)
static void test_wolfSSL_dtls_send_ch(WOLFSSL* ssl) static void test_wolfSSL_dtls_send_ch(WOLFSSL* ssl)
{ {
int fd, ret; int fd, ret;

View File

@@ -232,6 +232,7 @@ on the specific device platform.
(!defined(WOLFSSL_HAVE_PSA) || defined(WOLFSSL_PSA_NO_HASH)) && \ (!defined(WOLFSSL_HAVE_PSA) || defined(WOLFSSL_PSA_NO_HASH)) && \
!defined(WOLFSSL_RENESAS_RX64_HASH) !defined(WOLFSSL_RENESAS_RX64_HASH)
#if defined(WOLFSSL_X86_64_BUILD) && defined(USE_INTEL_SPEEDUP) && (defined(HAVE_INTEL_AVX1) || defined(HAVE_INTEL_AVX2))
static void Sha256_SetTransform( static void Sha256_SetTransform(
#ifdef WC_C_DYNAMIC_FALLBACK #ifdef WC_C_DYNAMIC_FALLBACK
int *sha_method int *sha_method
@@ -239,6 +240,7 @@ static void Sha256_SetTransform(
void void
#endif #endif
); );
#endif
static int InitSha256(wc_Sha256* sha256) static int InitSha256(wc_Sha256* sha256)
{ {
@@ -594,6 +596,8 @@ static int InitSha256(wc_Sha256* sha256)
} }
#define XTRANSFORM_LEN(...) inline_XTRANSFORM_LEN(__VA_ARGS__) #define XTRANSFORM_LEN(...) inline_XTRANSFORM_LEN(__VA_ARGS__)
static word32 intel_flags;
static void Sha256_SetTransform(void) static void Sha256_SetTransform(void)
{ {

View File

@@ -574,7 +574,6 @@ static int InitSha512_256(wc_Sha512* sha512)
return ret; return ret;
#undef SHA_METHOD #undef SHA_METHOD
} }
#define XTRANSFORM(...) inline_XTRANSFORM(__VA_ARGS__)
static WC_INLINE int Transform_Sha512_Len(wc_Sha512 *sha512, word32 len) { static WC_INLINE int Transform_Sha512_Len(wc_Sha512 *sha512, word32 len) {
#ifdef WC_C_DYNAMIC_FALLBACK #ifdef WC_C_DYNAMIC_FALLBACK
@@ -607,7 +606,6 @@ static int InitSha512_256(wc_Sha512* sha512)
return ret; return ret;
#undef SHA_METHOD #undef SHA_METHOD
} }
#define XTRANSFORM_LEN(...) inline_XTRANSFORM_LEN(__VA_ARGS__)
#else /* !WC_NO_INTERNAL_FUNCTION_POINTERS */ #else /* !WC_NO_INTERNAL_FUNCTION_POINTERS */
@@ -643,6 +641,8 @@ static int InitSha512_256(wc_Sha512* sha512)
return ret; return ret;
} }
static word32 intel_flags;
static void Sha512_SetTransform(void) static void Sha512_SetTransform(void)
{ {
if (transform_check) if (transform_check)