image: Add facility to write unsigned images
Change image_write_signed to image_write, and conditionally write the signature if one is present. This will allow us to write unsigned images when detaching a sig from an image. Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
This commit is contained in:
parent
a8f1453a53
commit
be7559abfe
3 changed files with 23 additions and 12 deletions
2
image.h
2
image.h
|
@ -80,7 +80,7 @@ struct image *image_load(const char *filename);
|
|||
int image_pecoff_parse(struct image *image);
|
||||
int image_find_regions(struct image *image);
|
||||
int image_hash_sha256(struct image *image, uint8_t digest[]);
|
||||
int image_write_signed(struct image *image, const char *filename);
|
||||
int image_write(struct image *image, const char *filename);
|
||||
int image_write_detached(struct image *image, const char *filename);
|
||||
|
||||
#endif /* IMAGE_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue