Skip to content

Commit 6a05071

Browse files
authored
Merge pull request #129 from bigbrett/img-mgr
Add image manager
2 parents d03b816 + d81ae06 commit 6a05071

File tree

10 files changed

+2096
-15
lines changed

10 files changed

+2096
-15
lines changed

src/wh_server_img_mgr.c

Lines changed: 449 additions & 0 deletions
Large diffs are not rendered by default.

test/Makefile

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ SRC_C += \
178178
$(WOLFHSM_DIR)/src/wh_server_keystore.c \
179179
$(WOLFHSM_DIR)/src/wh_server_counter.c \
180180
$(WOLFHSM_DIR)/src/wh_server_cert.c \
181+
$(WOLFHSM_DIR)/src/wh_server_img_mgr.c \
181182
$(WOLFHSM_DIR)/src/wh_nvm.c \
182183
$(WOLFHSM_DIR)/src/wh_comm.c \
183184
$(WOLFHSM_DIR)/src/wh_message_comm.c \
@@ -212,15 +213,16 @@ SRC_C += \
212213

213214
# APP
214215
SRC_C += \
215-
./src/wh_test.c \
216-
./src/wh_test_comm.c \
217-
./src/wh_test_crypto.c \
218-
./src/wh_test_she.c \
219-
./src/wh_test_nvm_flash.c \
220-
./src/wh_test_clientserver.c \
221-
./src/wh_test_flash_ramsim.c \
222-
./src/wh_test_check_struct_padding.c \
223-
./src/wh_test_cert.c
216+
wh_test.c \
217+
wh_test_comm.c \
218+
wh_test_crypto.c \
219+
wh_test_she.c \
220+
wh_test_nvm_flash.c \
221+
wh_test_clientserver.c \
222+
wh_test_flash_ramsim.c \
223+
wh_test_check_struct_padding.c \
224+
wh_test_cert.c \
225+
wh_test_server_img_mgr.c
224226

225227
ifeq ($(TESTWOLFCRYPT),1)
226228
SRC_C += ./src/wh_test_wolfcrypt_test.c

test/config/wolfhsm_cfg.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,8 @@
4242

4343
#define WOLFHSM_CFG_CERTIFICATE_MANAGER
4444
#define WOLFHSM_CFG_CERTIFICATE_MANAGER_ACERT
45+
46+
/* Enable Image Manager feature */
47+
#define WOLFHSM_CFG_SERVER_IMG_MGR
48+
4549
#endif /* WOLFHSM_CFG_H_ */

test/wh_test.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@
4545
#include "wh_test_wolfcrypt_test.h"
4646
#endif
4747

48+
#if defined(WOLFHSM_CFG_SERVER_IMG_MGR)
49+
#include "wh_test_server_img_mgr.h"
50+
#endif
51+
4852
#if defined(WOLFHSM_CFG_TEST_POSIX) && defined(WOLFHSM_CFG_ENABLE_CLIENT)
4953
#include "port/posix/posix_transport_tcp.h"
5054
#endif
@@ -73,6 +77,11 @@ int whTest_Unit(void)
7377
/* Crypto Tests */
7478
WH_TEST_ASSERT(0 == whTest_Crypto());
7579

80+
#if defined(WOLFHSM_CFG_SERVER_IMG_MGR) && !defined(WOLFHSM_CFG_NO_CRYPTO)
81+
/* Image Manager Tests */
82+
WH_TEST_ASSERT(0 == whTest_ServerImgMgr());
83+
#endif /* WOLFHSM_CFG_SERVER_IMG_MGR && !WOLFHSM_CFG_NO_CRYPTO */
84+
7685
#if defined(WOLFHSM_CFG_SHE_EXTENSION)
7786
WH_TEST_ASSERT(0 == whTest_She());
7887
#endif /* WOLFHSM_SHE_EXTENTION */

0 commit comments

Comments
 (0)