diff --git a/src/wh_client.c b/src/wh_client.c index 7467cc6a..05c49fc3 100644 --- a/src/wh_client.c +++ b/src/wh_client.c @@ -21,6 +21,9 @@ * */ +/* Pick up compile-time configuration */ +#include "wolfhsm/wh_settings.h" + /* System libraries */ #include #include /* For NULL */ @@ -44,8 +47,7 @@ #include "wolfssl/wolfcrypt/ecc.h" #include "wolfhsm/wh_client_cryptocb.h" - -#endif +#endif /* WOLFHSM_CFG_NO_CRYPTO */ /* Message definitions */ #include "wolfhsm/wh_message.h" diff --git a/src/wh_client_cryptocb.c b/src/wh_client_cryptocb.c index fe128ef8..742fcfa2 100644 --- a/src/wh_client_cryptocb.c +++ b/src/wh_client_cryptocb.c @@ -23,6 +23,9 @@ #include +/* Pick up compile-time configuration */ +#include "wolfhsm/wh_settings.h" + #include "wolfhsm/wh_client.h" #include "wolfhsm/wh_comm.h" #include "wolfhsm/wh_packet.h" diff --git a/src/wh_client_nvm.c b/src/wh_client_nvm.c index 34feb729..c532e6cf 100644 --- a/src/wh_client_nvm.c +++ b/src/wh_client_nvm.c @@ -25,6 +25,9 @@ #include /* For NULL */ #include /* For memset, memcpy */ +/* Pick up compile-time configuration */ +#include "wolfhsm/wh_settings.h" + /* Common WolfHSM types and defines shared with the server */ #include "wolfhsm/wh_common.h" #include "wolfhsm/wh_error.h" diff --git a/src/wh_client_she.c b/src/wh_client_she.c index 85bf34ca..8245342a 100644 --- a/src/wh_client_she.c +++ b/src/wh_client_she.c @@ -22,7 +22,8 @@ */ -#include "wolfhsm/wh_client.h" +/* Pick up compile-time configuration */ +#include "wolfhsm/wh_settings.h" #ifdef WOLFHSM_CFG_SHE_EXTENSION diff --git a/src/wh_comm.c b/src/wh_comm.c index 6c4b1f0b..474dc7eb 100644 --- a/src/wh_comm.c +++ b/src/wh_comm.c @@ -21,6 +21,8 @@ * */ +/* Pick up compile-time configuration */ +#include "wolfhsm/wh_settings.h" #include /* For sized ints */ #include diff --git a/src/wh_flash_ramsim.c b/src/wh_flash_ramsim.c index ae06ae37..c5316e24 100644 --- a/src/wh_flash_ramsim.c +++ b/src/wh_flash_ramsim.c @@ -21,6 +21,9 @@ * */ +/* Pick up compile-time configuration */ +#include "wolfhsm/wh_settings.h" + #include #include /* For NULL */ #include /* For malloc/free */ diff --git a/src/wh_flash_unit.c b/src/wh_flash_unit.c index 13ff129b..6e63049c 100644 --- a/src/wh_flash_unit.c +++ b/src/wh_flash_unit.c @@ -24,6 +24,9 @@ * */ +/* Pick up compile-time configuration */ +#include "wolfhsm/wh_settings.h" + #include #include /* For NULL */ #include /* For memset, memcpy */ diff --git a/src/wh_message_comm.c b/src/wh_message_comm.c index 29b70c6c..c9714526 100644 --- a/src/wh_message_comm.c +++ b/src/wh_message_comm.c @@ -20,6 +20,9 @@ * src/wh_message_comm.c */ +/* Pick up compile-time configuration */ +#include "wolfhsm/wh_settings.h" + #include #include #include diff --git a/src/wh_message_customcb.c b/src/wh_message_customcb.c index 2b8653ef..15aea192 100644 --- a/src/wh_message_customcb.c +++ b/src/wh_message_customcb.c @@ -21,6 +21,9 @@ * */ +/* Pick up compile-time configuration */ +#include "wolfhsm/wh_settings.h" + #include #include #include diff --git a/src/wh_message_nvm.c b/src/wh_message_nvm.c index 1e45566d..77408eaa 100644 --- a/src/wh_message_nvm.c +++ b/src/wh_message_nvm.c @@ -21,6 +21,9 @@ * */ +/* Pick up compile-time configuration */ +#include "wolfhsm/wh_settings.h" + #include #include #include diff --git a/src/wh_nvm.c b/src/wh_nvm.c index d678d1de..67b3594e 100644 --- a/src/wh_nvm.c +++ b/src/wh_nvm.c @@ -21,6 +21,9 @@ * */ +/* Pick up compile-time configuration */ +#include "wolfhsm/wh_settings.h" + #include #include /* For NULL */ #include /* For memset, memcpy */ diff --git a/src/wh_nvm_flash.c b/src/wh_nvm_flash.c index f907d8d4..6b68c84e 100644 --- a/src/wh_nvm_flash.c +++ b/src/wh_nvm_flash.c @@ -23,6 +23,9 @@ * */ +/* Pick up compile-time configuration */ +#include "wolfhsm/wh_settings.h" + #include #include /* For NULL */ #include /* For memset, memcpy */ diff --git a/src/wh_server.c b/src/wh_server.c index e5c58e1a..867107c5 100644 --- a/src/wh_server.c +++ b/src/wh_server.c @@ -21,6 +21,9 @@ * */ +/* Pick up compile-time configuration */ +#include "wolfhsm/wh_settings.h" + /* System libraries */ #include #include /* For NULL */ diff --git a/src/wh_server_counter.c b/src/wh_server_counter.c index 230e9c0d..c20aa74b 100644 --- a/src/wh_server_counter.c +++ b/src/wh_server_counter.c @@ -21,6 +21,9 @@ * */ +/* Pick up compile-time configuration */ +#include "wolfhsm/wh_settings.h" + #include #include diff --git a/src/wh_server_crypto.c b/src/wh_server_crypto.c index 29f2b7f1..33f3c7dc 100644 --- a/src/wh_server_crypto.c +++ b/src/wh_server_crypto.c @@ -21,8 +21,8 @@ * */ -/* Pick up server config */ -#include "wolfhsm/wh_server.h" +/* Pick up compile-time configuration */ +#include "wolfhsm/wh_settings.h" /* System libraries */ #include diff --git a/src/wh_server_customcb.c b/src/wh_server_customcb.c index 62b8554c..656c06ba 100644 --- a/src/wh_server_customcb.c +++ b/src/wh_server_customcb.c @@ -21,8 +21,8 @@ * */ -/* Pick up server config */ -#include "wolfhsm/wh_server.h" +/* Pick up compile-time configuration */ +#include "wolfhsm/wh_settings.h" #include #include diff --git a/src/wh_server_dma.c b/src/wh_server_dma.c index a8e4e79e..a9b0499a 100644 --- a/src/wh_server_dma.c +++ b/src/wh_server_dma.c @@ -20,14 +20,15 @@ * src/wh_server_dma.c */ -/* Pick up server config */ -#include "wolfhsm/wh_server.h" +/* Pick up compile-time configuration */ +#include "wolfhsm/wh_settings.h" #include #include #include #include "wolfhsm/wh_error.h" +#include "wolfhsm/wh_server.h" /* TODO: if the Address allowlist ever gets large, we should consider a more diff --git a/src/wh_server_keystore.c b/src/wh_server_keystore.c index 717e8524..85cfe52f 100644 --- a/src/wh_server_keystore.c +++ b/src/wh_server_keystore.c @@ -21,8 +21,8 @@ * */ -/* Pick up server config */ -#include "wolfhsm/wh_server.h" +/* Pick up compile-time configuration */ +#include "wolfhsm/wh_settings.h" /* System libraries */ #include @@ -39,10 +39,12 @@ #include "wolfhsm/wh_error.h" #include "wolfhsm/wh_message.h" #include "wolfhsm/wh_packet.h" +#include "wolfhsm/wh_server.h" #ifdef WOLFHSM_CFG_SHE_EXTENSION #include "wolfhsm/wh_server_she.h" #endif + #include "wolfhsm/wh_server_keystore.h" int hsmGetUniqueId(whServerContext* server, whNvmId* outId) diff --git a/src/wh_server_nvm.c b/src/wh_server_nvm.c index 008a7503..4f16c3de 100644 --- a/src/wh_server_nvm.c +++ b/src/wh_server_nvm.c @@ -21,8 +21,8 @@ * */ -/* Pick up server config */ -#include "wolfhsm/wh_server.h" +/* Pick up compile-time configuration */ +#include "wolfhsm/wh_settings.h" /* System libraries */ #include @@ -38,6 +38,7 @@ #include "wolfhsm/wh_message.h" #include "wolfhsm/wh_message_nvm.h" +#include "wolfhsm/wh_server.h" #include "wolfhsm/wh_server_nvm.h" int wh_Server_HandleNvmRequest(whServerContext* server, diff --git a/src/wh_server_she.c b/src/wh_server_she.c index e4bf5deb..96c10bab 100644 --- a/src/wh_server_she.c +++ b/src/wh_server_she.c @@ -21,19 +21,19 @@ * */ - +/* Pick up compile-time configuration */ +#include "wolfhsm/wh_settings.h" /* System libraries */ #include #include /* For NULL */ #include /* For memset, memcpy */ - -#include "wolfhsm/wh_server.h" #include "wolfhsm/wh_message.h" #include "wolfhsm/wh_packet.h" #include "wolfhsm/wh_error.h" #include "wolfhsm/wh_utils.h" +#include "wolfhsm/wh_server.h" #ifndef WOLFHSM_CFG_NO_CRYPTO #include "wolfssl/wolfcrypt/settings.h" diff --git a/src/wh_she_common.c b/src/wh_she_common.c index c097af02..3b7c9a05 100644 --- a/src/wh_she_common.c +++ b/src/wh_she_common.c @@ -35,6 +35,7 @@ #include "wolfhsm/wh_error.h" #include "wolfhsm/wh_utils.h" +#include "wolfhsm/wh_she_common.h" typedef struct { uint32_t count; diff --git a/src/wh_transport_mem.c b/src/wh_transport_mem.c index c1ae3143..5bdb62ae 100644 --- a/src/wh_transport_mem.c +++ b/src/wh_transport_mem.c @@ -22,6 +22,9 @@ * Implementation of transport callbacks using 2 memory blocks */ +/* Pick up compile-time configuration */ +#include "wolfhsm/wh_settings.h" + #include #include #include diff --git a/src/wh_utils.c b/src/wh_utils.c index b401c44b..86fd30ab 100644 --- a/src/wh_utils.c +++ b/src/wh_utils.c @@ -21,6 +21,9 @@ * */ +/* Pick up compile-time configuration */ +#include "wolfhsm/wh_settings.h" + #include #include "wolfhsm/wh_utils.h" diff --git a/test/wh_test_crypto.c b/test/wh_test_crypto.c index 8a4b3df3..5890a5a7 100644 --- a/test/wh_test_crypto.c +++ b/test/wh_test_crypto.c @@ -21,6 +21,8 @@ * */ +#include "wolfhsm/wh_settings.h" + #include #include /* For printf */ #include /* For memset, memcpy */ @@ -36,8 +38,9 @@ #include "wolfhsm/wh_flash_ramsim.h" #include "wolfhsm/wh_comm.h" #include "wolfhsm/wh_message.h" -#include "wolfhsm/wh_server.h" #include "wolfhsm/wh_client.h" +#include "wolfhsm/wh_server.h" + #include "wolfhsm/wh_transport_mem.h" #include "wh_test_common.h"