From: Julien Olivain via buildroot <buildroot@buildroot.org>
To: James Hilliard <james.hilliard1@gmail.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v2 1/1] package/uboot-tools: fix host FIT signature support
Date: Wed, 29 Jul 2026 20:48:11 +0200 [thread overview]
Message-ID: <6fd2840758594f0dc0101e52efc49024@free.fr> (raw)
In-Reply-To: <20260728194541.507655-1-james.hilliard1@gmail.com>
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 <james.hilliard1@gmail.com>
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
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2026-07-29 18:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-28 19:45 [Buildroot] [PATCH v2 1/1] package/uboot-tools: fix host FIT signature support James Hilliard
2026-07-29 18:48 ` Julien Olivain via buildroot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6fd2840758594f0dc0101e52efc49024@free.fr \
--to=buildroot@buildroot.org \
--cc=james.hilliard1@gmail.com \
--cc=ju.o@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox