scripts: imgtool: added fixed signature script option #2252
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the option of passing
fix-sig-script
as an external script to be called for signature generation, to then let the process continue as if it had generated the signature itself.The current flow
To use a public key and an external signature provider, you'd have to:
imgtool
with--vector-to-sign
to save the vectorimgtool
again, this time providing it with--fix-sig
and--fix-sig-pubkey
New possible flow with proposed changes
imgtool
with--fix-sig-script
and--fix-sig-pubkey
matchingCodebases or other downstream dependencies that rely on baking in calls to
imgtool
and mainly having a singular call in the normal path, but otherwise taking in allimgtool
options now gets to keep that, and simply provide the script as an extra option, but not needing a different flow from e.g. a debug build.This lets the difference between e.g. a debug and a release build be entirely managed in the signature script, and so lets the same pipeline be used opaquely while still generating different builds signed with different keys depending on environment.