1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-12-26 22:04:35 +01:00

mkimage: add public key for image pre-load stage

This commit enhances mkimage to update the node
/image/pre-load/sig with the public key.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
This commit is contained in:
Philippe Reynes
2022-03-28 22:57:02 +02:00
committed by Tom Rini
parent 2404a01544
commit 6e052d1cba
3 changed files with 132 additions and 0 deletions

View File

@@ -1019,6 +1019,21 @@ int fit_image_hash_get_value(const void *fit, int noffset, uint8_t **value,
int fit_set_timestamp(void *fit, int noffset, time_t timestamp);
/**
* fit_pre_load_data() - add public key to fdt blob
*
* Adds public key to the node pre load.
*
* @keydir: Directory containing keys
* @keydest: FDT blob to write public key
* @fit: Pointer to the FIT format image header
*
* returns:
* 0, on success
* < 0, on failure
*/
int fit_pre_load_data(const char *keydir, void *keydest, void *fit);
int fit_cipher_data(const char *keydir, void *keydest, void *fit,
const char *comment, int require_keys,
const char *engine_id, const char *cmdname);