mirror of
https://xff.cz/git/u-boot/
synced 2025-10-26 16:13:55 +01:00
tools: mkimage: Show where signatures/keys are written
At present mkimage displays the node information but it is not clear what
signing action was taken. Add a message that shows it. For now it only
supports showing a single signing action, since that is the common case.
Sample:
Signature written to 'sha1-basic/test.fit',
node '/configurations/conf-1/signature'
Public key written to 'sha1-basic/sandbox-u-boot.dtb',
node '/signature/key-dev'
Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -1021,6 +1021,25 @@ int fit_cipher_data(const char *keydir, void *keydest, void *fit,
|
||||
const char *comment, int require_keys,
|
||||
const char *engine_id, const char *cmdname);
|
||||
|
||||
#define NODE_MAX_NAME_LEN 80
|
||||
|
||||
/**
|
||||
* struct image_summary - Provides information about signing info added
|
||||
*
|
||||
* @sig_offset: Offset of the node in the blob devicetree where the signature
|
||||
* was wriiten
|
||||
* @sig_path: Path to @sig_offset
|
||||
* @keydest_offset: Offset of the node in the keydest devicetree where the
|
||||
* public key was written (-1 if none)
|
||||
* @keydest_path: Path to @keydest_offset
|
||||
*/
|
||||
struct image_summary {
|
||||
int sig_offset;
|
||||
char sig_path[NODE_MAX_NAME_LEN];
|
||||
int keydest_offset;
|
||||
char keydest_path[NODE_MAX_NAME_LEN];
|
||||
};
|
||||
|
||||
/**
|
||||
* fit_add_verification_data() - add verification data to FIT image nodes
|
||||
*
|
||||
@@ -1032,6 +1051,7 @@ int fit_cipher_data(const char *keydir, void *keydest, void *fit,
|
||||
* @engine_id: Engine to use for signing
|
||||
* @cmdname: Command name used when reporting errors
|
||||
* @algo_name: Algorithm name, or NULL if to be read from FIT
|
||||
* @summary: Returns information about what data was written
|
||||
*
|
||||
* Adds hash values for all component images in the FIT blob.
|
||||
* Hashes are calculated for all component images which have hash subnodes
|
||||
@@ -1046,7 +1066,8 @@ int fit_cipher_data(const char *keydir, void *keydest, void *fit,
|
||||
int fit_add_verification_data(const char *keydir, const char *keyfile,
|
||||
void *keydest, void *fit, const char *comment,
|
||||
int require_keys, const char *engine_id,
|
||||
const char *cmdname, const char *algo_name);
|
||||
const char *cmdname, const char *algo_name,
|
||||
struct image_summary *summary);
|
||||
|
||||
/**
|
||||
* fit_image_verify_with_data() - Verify an image with given data
|
||||
|
||||
Reference in New Issue
Block a user