From 6e052d1cbafbedbfba73070da483111f2ae68e5a Mon Sep 17 00:00:00 2001 From: Philippe Reynes Date: Mon, 28 Mar 2022 22:57:02 +0200 Subject: 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 Signed-off-by: Philippe Reynes --- include/image.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include') diff --git a/include/image.h b/include/image.h index 496b7af3f36..498eb7f2e3e 100644 --- a/include/image.h +++ b/include/image.h @@ -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); -- cgit v1.2.3