Fix STM32MP13x STM32 AES GCM.

This commit is contained in:
David Garske
2025-05-13 07:15:04 -07:00
parent 4fd76dae95
commit 6270429089

View File

@ -8899,13 +8899,14 @@ static WARN_UNUSED_RESULT int wc_AesGcmDecrypt_STM32(
if ((authInSz > 0) && (authInSz < 16)) { if ((authInSz > 0) && (authInSz < 16)) {
authPadSz = 16 - authInSz; authPadSz = 16 - authInSz;
} }
#endif #else
if (authPadSz != 0) { if (authPadSz != 0) {
authPadSz = authInSz + STM_CRYPT_HEADER_WIDTH - authPadSz; authPadSz = authInSz + STM_CRYPT_HEADER_WIDTH - authPadSz;
} }
else { else {
authPadSz = authInSz; authPadSz = authInSz;
} }
#endif
/* for cases where hardware cannot be used for authTag calculate it */ /* for cases where hardware cannot be used for authTag calculate it */
/* if IV is not 12 calculate GHASH using software */ /* if IV is not 12 calculate GHASH using software */