sysupgrade: Add support to authenticate image using TZ

This change will look for existence of file /sys/sec_upgrade/sec_auth
if the file exists, it performs image authentication with the new
approach i.e TZ enabled mechanism.

It reads all the sections of the single image and writes each
section's type and image file path in /sys/sec_upgrade/sec_auth.
If a written section image is a proper signed image, then it will
return success else will cause the failure.

Change-Id: I649581e0ab74a66d677e5bfbf1c34fd83cb2465d
Signed-off-by: Avinash Pandey <avinasv@codeaurora.org>
diff --git a/tools/sysupgrade.h b/tools/sysupgrade.h
index ec8f629..1e53ff8 100644
--- a/tools/sysupgrade.h
+++ b/tools/sysupgrade.h
@@ -32,6 +32,7 @@
 	int local_version;
 	char *version_file;
 	int is_present;
+	char *img_code;
 	int (*pre_op)(struct image_section *);
 	int (*get_sw_id)(struct image_section *);
 	int (*split_components)(struct image_section *, char **, char**, char**);