Skip to content

Commit bb35305

Browse files
authored
fixes: wrong #endif placement in wh_client_crypto.c and #include order in nvm_flah_log.h (#243)
* nvm: flash_log: fix include order not picking up settings * fix: wrong #endif placement previous refactor leaves a spurious #endif that broke (at least) builds without WOLFSSL_CMAC
1 parent 0851501 commit bb35305

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/wh_client_crypto.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2823,6 +2823,7 @@ int wh_Client_AesGetKeyId(Aes* key, whNvmId* outId)
28232823
*outId = WH_DEVCTX_TO_KEYID(key->devCtx);
28242824
return WH_ERROR_OK;
28252825
}
2826+
#endif /* !NO_AES */
28262827

28272828
#ifdef WOLFSSL_CMAC
28282829
int wh_Client_CmacSetKeyId(Cmac* key, whNvmId keyId)
@@ -2868,7 +2869,6 @@ int wh_Client_Cmac(whClientContext* ctx, Cmac* cmac, CmacType type,
28682869
WH_DEBUG_CLIENT_VERBOSE("cmac key:%p key_len:%d in:%p in_len:%d out:%p out_len:%d "
28692870
"keyId:%x\n",
28702871
key, (int)keyLen, in, (int)inLen, outMac, (int)mac_len, key_id);
2871-
#endif
28722872

28732873

28742874
/* Get data pointer */

wolfhsm/wh_nvm_flash_log.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
#ifndef WOLFHSM_WH_NVM_FLASH_LOG_H_
2020
#define WOLFHSM_WH_NVM_FLASH_LOG_H_
2121

22-
#if defined(WOLFHSM_CFG_SERVER_NVM_FLASH_LOG)
23-
2422
#include "wolfhsm/wh_settings.h"
2523

24+
#if defined(WOLFHSM_CFG_SERVER_NVM_FLASH_LOG)
25+
2626
#include "wolfhsm/wh_common.h"
2727
#include "wolfhsm/wh_flash.h"
2828

0 commit comments

Comments
 (0)