Skip to content

Commit

Permalink
wolfcrypt/test/test.c: fix scoping of hkdf_test();
Browse files Browse the repository at this point in the history
wolfcrypt/test/test.h: include <wolfssl/wolfcrypt/types.h> to be sure sword32 is available.
  • Loading branch information
douzzer committed Jun 14, 2023
1 parent bb5e09c commit 902d47a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions wolfcrypt/test/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions wolfcrypt/test/test.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#ifndef WOLFCRYPT_TEST_H
#define WOLFCRYPT_TEST_H

#include <wolfssl/wolfcrypt/types.h>

#ifdef __cplusplus
extern "C" {
Expand Down

0 comments on commit 902d47a

Please sign in to comment.