File tree Expand file tree Collapse file tree 4 files changed +9
-4
lines changed
Expand file tree Collapse file tree 4 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -46,12 +46,14 @@ int wh_DemoClient_All(whClientContext* clientContext)
4646 }
4747#endif
4848
49+ #ifdef WOLFHSM_CFG_TEST_POSIX
4950#ifdef WOLFHSM_CFG_KEYWRAP
5051 rc = wh_DemoClient_KeyWrap (clientContext );
5152 if (rc != 0 ) {
5253 return rc ;
5354 }
5455#endif /* WOLFHSM_CFG_KEYWRAP */
56+ #endif /* WOLFHSM_CFG_TEST_POSIX */
5557
5658 /**Crypto demos */
5759#ifndef NO_RSA
Original file line number Diff line number Diff line change 3131#include "wolfssl/wolfcrypt/aes.h"
3232#include "wolfssl/wolfcrypt/random.h"
3333
34- #include "port/posix/posix_flash_file.h"
3534
3635#include "wh_demo_client_keywrap.h"
3736#include "test/wh_test_keywrap.h"
3837
38+ #ifdef WOLFHSM_CFG_TEST_POSIX
39+ #include "port/posix/posix_flash_file.h"
40+
3941#ifdef WOLFHSM_CFG_KEYWRAP
4042
4143int wh_DemoClient_KeyWrap (whClientContext * client )
@@ -44,8 +46,7 @@ int wh_DemoClient_KeyWrap(whClientContext* client)
4446
4547 /* file-based flash state and configuration */
4648 posixFlashFileContext flashFileCtx ;
47- posixFlashFileConfig flashFileCfg = {.filename = "flashFile" ,
48- .partition_size = 1024 * 1024 ,
49+ posixFlashFileConfig flashFileCfg = {.partition_size = 1024 * 1024 ,
4950 .erased_byte = 0xff };
5051 whFlashCb flashFileCb [1 ] = {POSIX_FLASH_FILE_CB };
5152
@@ -86,3 +87,4 @@ int wh_DemoClient_KeyWrap(whClientContext* client)
8687 return ret ;
8788}
8889#endif /* WOLFHSM_CFG_KEYWRAP */
90+ #endif /* WOLFHSM_CFG_TEST_POSIX */
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ SRC_C += $(wildcard $(WOLFSSL_DIR)/wolfcrypt/benchmark/*.c)
106106SRC_C += $(wildcard $(WOLFHSM_DIR ) /src/* .c)
107107
108108# wolfHSM test code
109- SRC_C += $(wildcard $( WOLFHSM_DIR ) /test/wh_test_keywrap.c)
109+ SRC_C += $(WOLFHSM_DIR ) /test/wh_test_keywrap.c
110110
111111# wolfHSM port/HAL code
112112SRC_C += $(wildcard $(WOLFHSM_PORT_DIR ) /* .c)
Original file line number Diff line number Diff line change 3030#define WOLFHSM_CFG_HEXDUMP
3131#define WOLFHSM_CFG_COMM_DATA_LEN 5000
3232#define WOLFHSM_CFG_KEYWRAP
33+ #define WOLFHSM_CFG_TEST_POSIX
3334
3435#endif /* WOLFHSM_CFG_H_ */
You can’t perform that action at this time.
0 commit comments