Skip to content

Commit

Permalink
Merge pull request #19 from billphipps/examples_fixes
Browse files Browse the repository at this point in the history
Examples fixes
  • Loading branch information
bigbrett authored Apr 10, 2024
2 parents 2d2db1a + c671b51 commit cba84e8
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 26 deletions.
54 changes: 28 additions & 26 deletions test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,58 +54,60 @@ CFLAGS += -DWH_CONFIG
# Assembly source files
SRC_ASM +=

# wolfCrypt source files
SRC_C += \
$(WOLFSSL_DIR)/wolfcrypt/src/wc_port.c \
$(WOLFSSL_DIR)/wolfcrypt/src/memory.c \
$(WOLFSSL_DIR)/wolfcrypt/src/misc.c \
$(WOLFSSL_DIR)/wolfcrypt/src/cryptocb.c \
$(WOLFSSL_DIR)/wolfcrypt/src/random.c \
$(WOLFSSL_DIR)/wolfcrypt/src/asn.c \
$(WOLFSSL_DIR)/wolfcrypt/src/coding.c \
$(WOLFSSL_DIR)/wolfcrypt/src/wolfmath.c \
$(WOLFSSL_DIR)/wolfcrypt/src/tfm.c \
$(WOLFSSL_DIR)/wolfcrypt/src/fe_operations.c \
$(WOLFSSL_DIR)/wolfcrypt/src/cryptocb.c \
$(WOLFSSL_DIR)/wolfcrypt/src/random.c \
$(WOLFSSL_DIR)/wolfcrypt/src/aes.c \
$(WOLFSSL_DIR)/wolfcrypt/src/curve25519.c \
$(WOLFSSL_DIR)/wolfcrypt/src/rsa.c \
$(WOLFSSL_DIR)/wolfcrypt/src/curve25519.c \
$(WOLFSSL_DIR)/wolfcrypt/src/hash.c \
$(WOLFSSL_DIR)/wolfcrypt/src/sha256.c \
$(WOLFSSL_DIR)/wolfcrypt/src/cmac.c
$(WOLFSSL_DIR)/wolfcrypt/src/aes.c \
$(WOLFSSL_DIR)/wolfcrypt/src/cmac.c \

# WolfHSM source code
# wolfHSM source files
SRC_C += \
$(WOLFHSM_DIR)/src/wh_client.c \
$(WOLFHSM_DIR)/src/wh_client_nvm.c \
$(WOLFHSM_DIR)/src/wh_comm.c \
$(WOLFHSM_DIR)/src/wh_flash_unit.c \
$(WOLFHSM_DIR)/src/wh_message_comm.c \
$(WOLFHSM_DIR)/src/wh_message_nvm.c \
$(WOLFHSM_DIR)/src/wh_message_customcb.c \
$(WOLFHSM_DIR)/src/wh_nvm.c \
$(WOLFHSM_DIR)/src/wh_nvm_flash.c \
$(WOLFHSM_DIR)/src/wh_client_cryptocb.c \
$(WOLFHSM_DIR)/src/wh_server.c \
$(WOLFHSM_DIR)/src/wh_server_customcb.c \
$(WOLFHSM_DIR)/src/wh_server_nvm.c \
$(WOLFHSM_DIR)/src/wh_server_crypto.c \
$(WOLFHSM_DIR)/src/wh_server_customcb.c \
$(WOLFHSM_DIR)/src/wh_server_keystore.c \
$(WOLFHSM_DIR)/src/wh_client_cryptocb.c \
$(WOLFHSM_DIR)/src/wh_nvm.c \
$(WOLFHSM_DIR)/src/wh_comm.c \
$(WOLFHSM_DIR)/src/wh_message_comm.c \
$(WOLFHSM_DIR)/src/wh_message_customcb.c \
$(WOLFHSM_DIR)/src/wh_message_nvm.c \
$(WOLFHSM_DIR)/src/wh_transport_mem.c \
$(WOLFHSM_DIR)/src/wh_flash_ramsim.c

$(WOLFHSM_DIR)/src/wh_flash_ramsim.c \


# WolfHSM port code
# WolfHSM port/HAL code
SRC_C += \
$(WOLFHSM_DIR)/src/wh_nvm_flash.c \
$(WOLFHSM_DIR)/src/wh_flash_unit.c \
$(WOLFHSM_DIR)/src/wh_flash_ramsim.c \
$(WOLFHSM_DIR)/src/wh_transport_mem.c \
$(WOLFHSM_DIR)/port/posix/posix_flash_file.c \
$(WOLFHSM_DIR)/port/posix/posix_transport_tcp.c
$(WOLFHSM_DIR)/port/posix/posix_transport_tcp.c \

# APP
SRC_C += ./src/wh_test.c \
./src/wh_test_comm.c \
./src/wh_test_crypto.c \
./src/wh_test_nvm_flash.c \
./src/wh_test_clientserver.c \
./src/wh_test_flash_ramsim.c
SRC_C += \
./src/wh_test.c \
./src/wh_test_comm.c \
./src/wh_test_crypto.c \
./src/wh_test_nvm_flash.c \
./src/wh_test_clientserver.c \
./src/wh_test_flash_ramsim.c \


FILENAMES_C = $(notdir $(SRC_C))
Expand Down
3 changes: 3 additions & 0 deletions wolfhsm/wh_cryptocb.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
extern "C" {
#endif

#include "wolfssl/wolfcrypt/settings.h"
#include "wolfssl/wolfcrypt/cryptocb.h"

int wolfHSM_CryptoCb(int devId, wc_CryptoInfo* info, void* ctx);

#ifdef __cplusplus
Expand Down

0 comments on commit cba84e8

Please sign in to comment.