The image-data series [1] added FIT_IV_HINT, FIT_IV_PROP and
FIT_DATA_SIZE_UNCIPHERED_PROP to include/image.h. It was on the list at
the same time as the series that converted the remaining FIT property
literals in mkimage, boot and SPL [2], which was written before these
constants existed, so the cipher code still spells the three names out.
This series converts them: patch 1 the iv-name-hint and iv properties,
patch 2 data-size-unciphered, including the fit_cipher unit test that
sets it. The two patches touch different files and do not depend on each
other.

Patch 1 also uses FIT_IV_PROP for the iv property of the key node that
mkimage adds to the U-Boot device tree. That node is not part of the
FIT, but lib/rsa/rsa-sign.c already uses the FIT_* constants for the
properties of the key node it writes.

No functional change is intended. Built for sandbox and sandbox_spl
(U-Boot proper, SPL and host tools), the objects of all touched files
are identical before and after the series once debug info is stripped
and the embedded version string is held fixed. Each patch builds for
both boards, and the sandbox FIT, vboot, mkimage and dm-verity pytests,
the fit_cipher unit tests and the binman encrypted-FIT tests pass.

The series is based on main, where these constants are; next does not
have them yet.

[1] https://lore.kernel.org/r/[email protected]
[2] https://lore.kernel.org/r/[email protected]

Link to v1:
https://lore.kernel.org/u-boot/[email protected]/

Changes in v2:
- Patch 2 also converts the two literals in test/boot/fit_cipher.c
  (Simon)
- Collected Simon's Reviewed-by on both patches; patch 1 is unchanged

Aristo Chen (2):
  fit: use FIT_IV_PROP and FIT_IV_HINT for the iv properties
  fit: use FIT_DATA_SIZE_UNCIPHERED_PROP for data-size-unciphered

 boot/image-cipher.c    | 6 +++---
 boot/image-fit.c       | 2 +-
 lib/aes/aes-encrypt.c  | 6 +++---
 test/boot/fit_cipher.c | 4 ++--
 tools/image-host.c     | 6 ++++--
 5 files changed, 13 insertions(+), 11 deletions(-)

-- 
2.43.0

Reply via email to