Re: [Buildroot] [PATCH v2 1/1] package/uboot-tools: fix host FIT signature support
Julien Olivain via buildroot <[email protected]> Wed, 29 Jul 2026 20:48:11 +0200
| Newsgroups | net.busybox.buildroot |
|---|---|
| Message-ID | <[email protected]> |
On 28/07/2026 21:45, James Hilliard wrote: > U-Boot host tools use the tools configuration namespace when code calls > CONFIG_IS_ENABLED(). With USE_HOSTCC, CONFIG_IS_ENABLED(FIT_SIGNATURE) > resolves to CONFIG_TOOLS_FIT_SIGNATURE, while > CONFIG_VAL(FIT_SIGNATURE_MAX_SIZE) resolves to > CONFIG_TOOLS_FIT_SIGNATURE_MAX_SIZE. > > The host-uboot-tools package only generates the old > CONFIG_FIT_SIGNATURE > define. This makes tools/Makefile include fit_check_sign, but the host > code > sees FIT signature support as disabled and the OpenSSL-backed signing > and > verification objects are omitted. As a result, mkimage accepts a > signature > node without writing its value or injecting a required public key. > fit_check_sign then has no required key and reports success without > checking the configuration signature. > > A FIT-support-only configuration never exercises this path, which is > why > the existing hash-only runtime test still passes. > > Generate the tools FIT signature options needed by the host code and > pass > CONFIG_TOOLS_LIBCRYPTO=y so the OpenSSL-backed signing, verification > and > cipher objects are selected. Keep CONFIG_FIT_SIGNATURE=y in the make > options because U-Boot tools/Makefile still uses it to build > fit_check_sign. > > Extend TestHostUbootTools to create an RSA-signed FIT, require a > 256-byte > configuration signature and a required public key, verify the FIT, > corrupt > the signature, and require verification to fail. > > Signed-off-by: James Hilliard <[email protected]> Applied to master, thanks. For info, I added comments in the runtime test, to explain the test sequence. See: https://gitlab.com/buildroot.org/buildroot/-/commit/928cc5dc5cb82e6f2cb43f853488309eb806ef89 Best regards, Julien. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot