Skip to content

Commit 81d36d2

Browse files
committed
Fix a few compile errors due to config
1 parent 6c305a8 commit 81d36d2

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/wh_client_crypto.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,7 @@ static int _getCryptoResponse(uint8_t* respBuf, uint16_t type,
118118
/* Helper function to prepare a crypto request buffer with generic header */
119119
static uint8_t* _createCryptoRequest(uint8_t* reqBuf, uint16_t type)
120120
{
121-
whMessageCrypto_GenericRequestHeader* header =
122-
(whMessageCrypto_GenericRequestHeader*)reqBuf;
123-
header->algoType = type;
124-
header->algoSubType = WH_MESSAGE_CRYPTO_ALGO_SUBTYPE_NONE;
125-
return reqBuf + sizeof(whMessageCrypto_GenericRequestHeader);
121+
return _createCryptoRequestWithSubtype(reqBuf, type, WH_MESSAGE_CRYPTO_ALGO_SUBTYPE_NONE);
126122
}
127123

128124
/* Helper function to prepare a crypto request buffer with generic header and
@@ -2549,9 +2545,11 @@ int wh_Client_Sha256(whClientContext* ctx, wc_Sha256* sha256, const uint8_t* in,
25492545

25502546
/* reset the state of the sha context (without blowing away devId) */
25512547
sha256->buffLen = 0;
2552-
sha256->flags = 0;
25532548
sha256->hiLen = 0;
25542549
sha256->loLen = 0;
2550+
#ifdef WOLFSSL_HASH_FLAGS
2551+
sha256->flags = 0;
2552+
#endif
25552553
memset(sha256->digest, 0, sizeof(sha256->digest));
25562554
}
25572555

0 commit comments

Comments
 (0)