diff --git a/test/Makefile b/test/Makefile index 98b0501c..9feb99b2 100644 --- a/test/Makefile +++ b/test/Makefile @@ -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)) diff --git a/wolfhsm/wh_cryptocb.h b/wolfhsm/wh_cryptocb.h index b110eb64..c2fa8fd0 100644 --- a/wolfhsm/wh_cryptocb.h +++ b/wolfhsm/wh_cryptocb.h @@ -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