@@ -931,16 +931,16 @@ static int whTest_KeyCache(whClientContext* ctx, int devId, WC_RNG* rng)
931931 uint16_t keyId ;
932932 /* Key for regular cache (≤ WOLFHSM_CFG_SERVER_KEYCACHE_BUFSIZE) */
933933 const size_t smallKeySize = WOLFHSM_CFG_SERVER_KEYCACHE_BUFSIZE / 2 ;
934- uint8_t smallKey [smallKeySize ];
934+ uint8_t smallKey [WOLFHSM_CFG_SERVER_KEYCACHE_BUFSIZE / 2 ];
935935 /* Key for big cache (> WOLFHSM_CFG_SERVER_KEYCACHE_BUFSIZE) */
936936 const size_t bigKeySize = WOLFHSM_CFG_SERVER_KEYCACHE_BUFSIZE + 100 ;
937- uint8_t bigKey [bigKeySize ];
937+ uint8_t bigKey [WOLFHSM_CFG_SERVER_KEYCACHE_BUFSIZE + 100 ];
938938
939939 uint8_t labelSmall [WH_NVM_LABEL_LEN ] = "Small Key Label" ;
940940 uint8_t labelBig [WH_NVM_LABEL_LEN ] = "Big Key Label" ;
941941
942942 /* Buffer for exported key and metadata */
943- uint8_t exportedKey [bigKeySize ];
943+ uint8_t exportedKey [WOLFHSM_CFG_SERVER_KEYCACHE_BUFSIZE + 100 ];
944944 uint8_t exportedLabel [WH_NVM_LABEL_LEN ];
945945 uint16_t exportedKeySize ;
946946
@@ -1004,7 +1004,7 @@ static int whTest_KeyCache(whClientContext* ctx, int devId, WC_RNG* rng)
10041004 /* On error, try our best to clean up */
10051005 (void )wh_Client_KeyEvict (ctx , keyId );
10061006 }
1007-
1007+
10081008 if (ret == 0 ) {
10091009 ret = wh_Client_KeyEvict (ctx , keyId );
10101010 if (ret != 0 ) {
@@ -1078,7 +1078,7 @@ static int whTest_KeyCache(whClientContext* ctx, int devId, WC_RNG* rng)
10781078 /* On error, try our best to clean up */
10791079 (void )wh_Client_KeyEvict (ctx , keyId );
10801080 }
1081-
1081+
10821082 if (ret == 0 ) {
10831083 ret = wh_Client_KeyEvict (ctx , keyId );
10841084 if (ret != 0 ) {
@@ -1202,7 +1202,7 @@ static int whTest_KeyCache(whClientContext* ctx, int devId, WC_RNG* rng)
12021202 /* On error, try our best to clean up */
12031203 (void )wh_Client_KeyEvict (ctx , keyId );
12041204 }
1205-
1205+
12061206 if (ret == 0 ) {
12071207 ret = wh_Client_KeyEvict (ctx , keyId );
12081208 if (ret != 0 ) {
@@ -1278,7 +1278,7 @@ static int whTest_KeyCache(whClientContext* ctx, int devId, WC_RNG* rng)
12781278 /* On error, try our best to clean up */
12791279 (void )wh_Client_KeyEvict (ctx , keyId );
12801280 }
1281-
1281+
12821282 if (ret == 0 ) {
12831283 ret = wh_Client_KeyEvict (ctx , keyId );
12841284 if (ret != 0 ) {
0 commit comments