From 902d47aaa17e10652a37b2a00aa341622d4a4392 Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Wed, 14 Jun 2023 15:06:13 -0500 Subject: [PATCH] wolfcrypt/test/test.c: fix scoping of hkdf_test(); wolfcrypt/test/test.h: include to be sure sword32 is available. --- wolfcrypt/test/test.c | 12 ++++++++++++ wolfcrypt/test/test.h | 1 + 2 files changed, 13 insertions(+) diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index 46add1ad8a..4e477443ac 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -445,8 +445,14 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t hmac_sha384_test(void); WOLFSSL_TEST_SUBROUTINE wc_test_ret_t hmac_sha512_test(void); WOLFSSL_TEST_SUBROUTINE wc_test_ret_t hmac_sha3_test(void); #if defined(HAVE_HKDF) && !defined(NO_HMAC) +#if defined(WOLFSSL_AFALG_XILINX) || defined(WOLFSSL_AFALG_XILINX_AES) || \ + defined(WOLFSSL_AFALG_XILINX_SHA3) || defined(WOLFSSL_AFALG_HASH_KEEP) || \ + defined(WOLFSSL_AFALG_XILINX_RSA) /* hkdf_test has issue with WOLFSSL_TEST_SUBROUTINE set on Xilinx with afalg */ static wc_test_ret_t hkdf_test(void); +#else +WOLFSSL_TEST_SUBROUTINE wc_test_ret_t hkdf_test(void); +#endif #endif WOLFSSL_TEST_SUBROUTINE wc_test_ret_t sshkdf_test(void); #ifdef WOLFSSL_TLS13 @@ -22119,8 +22125,14 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t pwdbased_test(void) #if defined(HAVE_HKDF) && !defined(NO_HMAC) +#if defined(WOLFSSL_AFALG_XILINX) || defined(WOLFSSL_AFALG_XILINX_AES) || \ + defined(WOLFSSL_AFALG_XILINX_SHA3) || defined(WOLFSSL_AFALG_HASH_KEEP) || \ + defined(WOLFSSL_AFALG_XILINX_RSA) /* hkdf_test has issue with WOLFSSL_TEST_SUBROUTINE set on Xilinx with afalg */ static wc_test_ret_t hkdf_test(void) +#else +WOLFSSL_TEST_SUBROUTINE wc_test_ret_t hkdf_test(void) +#endif { wc_test_ret_t ret = 0; diff --git a/wolfcrypt/test/test.h b/wolfcrypt/test/test.h index 65c58a6ea9..801724093f 100644 --- a/wolfcrypt/test/test.h +++ b/wolfcrypt/test/test.h @@ -23,6 +23,7 @@ #ifndef WOLFCRYPT_TEST_H #define WOLFCRYPT_TEST_H +#include #ifdef __cplusplus extern "C" {