You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
imgtool's keys.load() silently falls through to load_pem_public_key
when the PEM contains no private material. As a result, `getpub`,
`getpubhash`, and `verify` have long accepted public-key-only PEMs,
which the Zephyr bootloader build relies on. This was neither tested
nor documented, leaving the capability exposed to silent regression.
Add parametrized tests covering getpub and getpubhash against pub-only
PEMs for all supported key types and encodings, asserting byte
equivalence with the private-key path.
Replace the AttributeError raised when `imgtool sign` is invoked with
a pub-only PEM with a descriptive click.UsageError, and add a regression
test. This matters for dev/prod key-split workflows where the signing
private key is held only by a release team.
Update docs/imgtool.md, docs/signed_images.md, and docs/readme-zephyr.md
to state that the bootloader build accepts pub-only PEMs, and that
`imgtool sign` itself still requires the private key.
Signed-off-by: JP Hutchins <jp@intercreate.io>
0 commit comments