Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for AES-GCM use with petalinux #6603

Merged
merged 1 commit into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion wolfcrypt/src/aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -9802,7 +9802,7 @@ int wc_AesInit(Aes* aes, void* heap, int devId)
aes->heap, devId);
#endif /* WOLFSSL_ASYNC_CRYPT */

#ifdef WOLFSSL_AFALG
#if defined(WOLFSSL_AFALG) || defined(WOLFSSL_AFALG_XILINX_AES)
aes->alFd = WC_SOCK_NOTSET;
aes->rdFd = WC_SOCK_NOTSET;
#endif
Expand Down
4 changes: 4 additions & 0 deletions wolfcrypt/src/port/af_alg/afalg_aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ static int wc_AesSetup(Aes* aes, const char* type, const char* name, int ivSz, i
aes->rdFd = WC_SOCK_NOTSET;
return WC_AFALG_SOCK_E;
}
#ifdef WOLFSSL_AFALG_XILINX_AES
ForceZero(key, sizeof(aes->msgBuf));
#else
ForceZero(key, sizeof(aes->key));
#endif

/* set up CMSG headers */
XMEMSET((byte*)&(aes->msg), 0, sizeof(struct msghdr));
Expand Down