Commit 20ffa1a4 authored by Marek Vasut's avatar Marek Vasut
Browse files

mxssb: Reinit the crypto IV after each section



The TAG command has to be encrypted using IV from the header,
so reinit the AES with the IV for each section.
Signed-off-by: Marek Vasut's avatarMarek Vasut <marex@denx.de>
parent 59d44fab
......@@ -420,11 +420,11 @@ static int sb_create_image(struct sb_image_ctx *ictx, uint8_t **image)
struct sb_command *ccmd;
sctx = ictx->sect;
sb_aes_reinit(ictx, sb_header->iv);
while (sctx) {
cctx = sctx->cmd;
sb_aes_reinit(ictx, sb_header->iv);
while (cctx) {
ccmd = &cctx->payload;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment