forked from wolfSSL/wolfssl
Fixes for building against older STM32 CubeMX HAL.
This commit is contained in:
@ -6049,13 +6049,13 @@ static int wc_AesGcmEncrypt_STM32(Aes* aes, byte* out, const byte* in, word32 sz
|
|||||||
/* GCM payload phase - partial remainder */
|
/* GCM payload phase - partial remainder */
|
||||||
XMEMSET(partialBlock, 0, sizeof(partialBlock));
|
XMEMSET(partialBlock, 0, sizeof(partialBlock));
|
||||||
XMEMCPY(partialBlock, in + (blocks * AES_BLOCK_SIZE), partial);
|
XMEMCPY(partialBlock, in + (blocks * AES_BLOCK_SIZE), partial);
|
||||||
status = HAL_CRYPEx_AESGCM_Encrypt(&hcryp, partialBlock, partial,
|
status = HAL_CRYPEx_AESGCM_Encrypt(&hcryp, (uint8_t*)partialBlock, partial,
|
||||||
partialBlock, STM32_HAL_TIMEOUT);
|
(uint8_t*)partialBlock, STM32_HAL_TIMEOUT);
|
||||||
XMEMCPY(out + (blocks * AES_BLOCK_SIZE), partialBlock, partial);
|
XMEMCPY(out + (blocks * AES_BLOCK_SIZE), partialBlock, partial);
|
||||||
}
|
}
|
||||||
if (status == HAL_OK) {
|
if (status == HAL_OK) {
|
||||||
/* Compute the authTag */
|
/* Compute the authTag */
|
||||||
status = HAL_CRYPEx_AESGCM_Finish(&hcryp, sz, tag, STM32_HAL_TIMEOUT);
|
status = HAL_CRYPEx_AESGCM_Finish(&hcryp, sz, (uint8_t*)tag, STM32_HAL_TIMEOUT);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user