Skip to content

Commit 78735dd

Browse files
committed
Address Brett's comments
1 parent fecb52f commit 78735dd

File tree

7 files changed

+28
-29
lines changed

7 files changed

+28
-29
lines changed

examples/posix/wh_posix_server/wh_posix_server.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,8 +451,9 @@ int main(int argc, char** argv)
451451

452452
/* Context 5: Set default server crypto to use cryptocb */
453453
s_conf->devId = HW_DEV_ID;
454-
WOLFHSM_CFG_PRINTF("Context 5: Setting up default server crypto with devId=%d\n",
455-
s_conf->devId);
454+
WOLFHSM_CFG_PRINTF(
455+
"Context 5: Setting up default server crypto with devId=%d\n",
456+
s_conf->devId);
456457

457458
rc = wc_InitRng_ex(crypto->rng, NULL, s_conf->devId);
458459
if (rc != 0) {

src/wh_server_crypto.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5964,23 +5964,23 @@ int wh_Server_HandleCryptoDmaRequest(whServerContext* ctx, uint16_t magic,
59645964
#endif /* HAVE_AESGCM */
59655965
#ifdef WOLFSSL_AES_COUNTER
59665966
case WC_CIPHER_AES_CTR:
5967-
ret = _HandleAesCtrDma(ctx, magic, devId, seq,
5968-
cryptoDataIn, cryptoInSize,
5969-
cryptoDataOut, &cryptoOutSize);
5967+
ret = _HandleAesCtrDma(ctx, magic, devId, seq, cryptoDataIn,
5968+
cryptoInSize, cryptoDataOut,
5969+
&cryptoOutSize);
59705970
break;
59715971
#endif /* WOLFSSL_AES_COUNTER */
59725972
#ifdef HAVE_AES_CBC
59735973
case WC_CIPHER_AES_CBC:
5974-
ret = _HandleAesCbcDma(ctx, magic, devId, seq,
5975-
cryptoDataIn, cryptoInSize,
5976-
cryptoDataOut, &cryptoOutSize);
5974+
ret = _HandleAesCbcDma(ctx, magic, devId, seq, cryptoDataIn,
5975+
cryptoInSize, cryptoDataOut,
5976+
&cryptoOutSize);
59775977
break;
59785978
#endif /* HAVE_AES_CBC */
59795979
#ifdef HAVE_AES_ECB
59805980
case WC_CIPHER_AES_ECB:
5981-
ret = _HandleAesEcbDma(ctx, magic, devId, seq,
5982-
cryptoDataIn, cryptoInSize,
5983-
cryptoDataOut, &cryptoOutSize);
5981+
ret = _HandleAesEcbDma(ctx, magic, devId, seq, cryptoDataIn,
5982+
cryptoInSize, cryptoDataOut,
5983+
&cryptoOutSize);
59845984
break;
59855985
#endif /* HAVE_AES_ECB */
59865986
default:

test/wh_test_check_struct_padding.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727

2828

2929
#include "wolfhsm/wh_message_comm.h"
30-
whMessageComm_ErrorResponse whMessageComm_ErrorResponse_test;
31-
whMessageCommInitRequest whMessageCommInitRequest_test;
32-
whMessageCommInitResponse whMessageCommInitResponse_test;
33-
whMessageCommInfoResponse whMessageCommInfoResponse_test;
30+
whMessageComm_ErrorResponse whMessageComm_ErrorResponse_test;
31+
whMessageCommInitRequest whMessageCommInitRequest_test;
32+
whMessageCommInitResponse whMessageCommInitResponse_test;
33+
whMessageCommInfoResponse whMessageCommInfoResponse_test;
3434

3535

3636
#include "wolfhsm/wh_message_customcb.h"

test/wh_test_clientserver.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,8 +1173,7 @@ int whTest_ClientServerSequential(whTestNvmBackendType nvmType)
11731173

11741174
#if !defined(WOLFHSM_CFG_NO_CRYPTO) && defined(HAVE_AES_CBC)
11751175
/* Test split AES CBC request/response */
1176-
WH_TEST_RETURN_ON_FAIL(
1177-
_testAesCbcRequestResponse(client, server));
1176+
WH_TEST_RETURN_ON_FAIL(_testAesCbcRequestResponse(client, server));
11781177
#endif /* !WOLFHSM_CFG_NO_CRYPTO && HAVE_AES_CBC */
11791178

11801179
/* Check that we are still connected */

test/wh_test_crypto_affinity.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -244,11 +244,11 @@ static int whTest_CryptoAffinityWithCb(void)
244244

245245
{
246246
Aes aes[1];
247-
uint8_t key[AES_BLOCK_SIZE] = {0x01};
248-
uint8_t iv[AES_BLOCK_SIZE] = {0x02};
249-
uint8_t plainIn[AES_BLOCK_SIZE] = {0x03};
247+
uint8_t key[AES_BLOCK_SIZE] = {0x01};
248+
uint8_t iv[AES_BLOCK_SIZE] = {0x02};
249+
uint8_t plainIn[AES_BLOCK_SIZE] = {0x03};
250250
uint8_t cipherOut[AES_BLOCK_SIZE] = {0};
251-
uint32_t outSize = 0;
251+
uint32_t outSize = 0;
252252

253253
WH_TEST_RETURN_ON_FAIL(wc_AesInit(aes, NULL, INVALID_DEVID));
254254
WH_TEST_RETURN_ON_FAIL(
@@ -270,11 +270,11 @@ static int whTest_CryptoAffinityWithCb(void)
270270

271271
{
272272
Aes aes[1];
273-
uint8_t key[AES_BLOCK_SIZE] = {0x01};
274-
uint8_t iv[AES_BLOCK_SIZE] = {0x02};
275-
uint8_t plainIn[AES_BLOCK_SIZE] = {0x03};
273+
uint8_t key[AES_BLOCK_SIZE] = {0x01};
274+
uint8_t iv[AES_BLOCK_SIZE] = {0x02};
275+
uint8_t plainIn[AES_BLOCK_SIZE] = {0x03};
276276
uint8_t cipherOut[AES_BLOCK_SIZE] = {0};
277-
uint32_t outSize = 0;
277+
uint32_t outSize = 0;
278278

279279
WH_TEST_RETURN_ON_FAIL(wc_AesInit(aes, NULL, INVALID_DEVID));
280280
WH_TEST_RETURN_ON_FAIL(
@@ -454,7 +454,7 @@ static int whTest_CryptoAffinityNoCb(void)
454454
uint8_t iv[AES_BLOCK_SIZE] = {0x02};
455455
uint8_t plainIn[AES_BLOCK_SIZE] = {0x03};
456456
uint8_t cipherOut[AES_BLOCK_SIZE] = {0};
457-
uint32_t outSize = 0;
457+
uint32_t outSize = 0;
458458

459459
WH_TEST_RETURN_ON_FAIL(wc_AesInit(aes, NULL, INVALID_DEVID));
460460
WH_TEST_RETURN_ON_FAIL(
@@ -478,7 +478,7 @@ static int whTest_CryptoAffinityNoCb(void)
478478
uint8_t iv[AES_BLOCK_SIZE] = {0x02};
479479
uint8_t plainIn[AES_BLOCK_SIZE] = {0x03};
480480
uint8_t cipherOut[AES_BLOCK_SIZE] = {0};
481-
uint32_t outSize = 0;
481+
uint32_t outSize = 0;
482482

483483
WH_TEST_RETURN_ON_FAIL(wc_AesInit(aes, NULL, INVALID_DEVID));
484484
WH_TEST_RETURN_ON_FAIL(

wolfhsm/wh_client.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848

4949
/* Component includes */
5050
#include "wolfhsm/wh_comm.h"
51-
#include "wolfhsm/wh_message_comm.h"
5251
#include "wolfhsm/wh_message_customcb.h"
5352
#ifdef WOLFHSM_CFG_DMA
5453
#include "wolfhsm/wh_dma.h"

wolfhsm/wh_server.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ struct whServerContext_t {
160160
whCommServer comm[1];
161161
#ifndef WOLFHSM_CFG_NO_CRYPTO
162162
whServerCryptoContext* crypto;
163-
int defaultDevId;
163+
int defaultDevId;
164164
whKeyCacheContext localCache; /* Unified cache structure */
165165
#ifdef WOLFHSM_CFG_SHE_EXTENSION
166166
whServerSheContext* she;

0 commit comments

Comments
 (0)