mirror of
https://github.com/apache/nuttx.git
synced 2026-03-27 02:29:15 +08:00
arch/xtensa/espressif: Fix SHA errors
Fix SHA errors for esp32[-s2|-s3] Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
This commit is contained in:
@@ -516,6 +516,15 @@ static int esp_newsession(uint32_t *sid, struct cryptoini *cri)
|
||||
return -ENOBUFS;
|
||||
}
|
||||
|
||||
if (cri->cri_klen / 8 > axf->keysize)
|
||||
{
|
||||
axf->init(data->hw_ictx);
|
||||
axf->update(data->hw_ictx, (uint8_t *)cri->cri_key,
|
||||
cri->cri_klen / 8);
|
||||
axf->final((uint8_t *)cri->cri_key, data->hw_ictx);
|
||||
cri->cri_klen = axf->hashsize * 8;
|
||||
}
|
||||
|
||||
for (k = 0; k < cri->cri_klen / 8; k++)
|
||||
{
|
||||
cri->cri_key[k] ^= HMAC_IPAD_VAL;
|
||||
|
||||
Reference in New Issue
Block a user