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:
Jeremy Kerr 2012-06-12 10:19:08 +08:00
parent a8f1453a53
commit be7559abfe
3 changed files with 23 additions and 12 deletions

View file

@ -212,7 +212,7 @@ int main(int argc, char **argv)
if (ctx->detached)
image_write_detached(ctx->image, ctx->outfilename);
else
image_write_signed(ctx->image, ctx->outfilename);
image_write(ctx->image, ctx->outfilename);
talloc_free(ctx);