if (verify) {
puts(" Verifying Hash Integrity ... ");
- if (!fit_image_check_hashes(fit, os_noffset)) {
+ if (!fit_image_verify(fit, os_noffset)) {
puts("Bad Data Hash\n");
bootstage_error(BOOTSTAGE_ID_FIT_CHECK_HASH);
return 0;
fit_print_contents(hdr);
- if (!fit_all_image_check_hashes(hdr)) {
+ if (!fit_all_image_verify(hdr)) {
puts("Bad hash in FIT image!\n");
return 1;
}
}
/* verify integrity */
- if (!fit_image_check_hashes (fit_hdr, noffset)) {
+ if (!fit_image_verify(fit_hdr, noffset)) {
puts ("Bad Data Hash\n");
return 1;
}
/* verify integrity */
if (verify) {
- if (!fit_image_check_hashes (fit_hdr, noffset)) {
+ if (!fit_image_verify(fit_hdr, noffset)) {
puts ("Bad Data Hash\n");
return 1;
}
/* verify integrity */
if (verify) {
- if (!fit_image_check_hashes(fit_hdr, noffset)) {
+ if (!fit_image_verify(fit_hdr, noffset)) {
puts("Bad Data Hash\n");
return 1;
}
}
/**
- * fit_image_check_hashes - verify data intergity
+ * fit_image_verify - verify data intergity
* @fit: pointer to the FIT format image header
* @image_noffset: component image node offset
*
- * fit_image_check_hashes() goes over component image hash nodes,
+ * fit_image_verify() goes over component image hash nodes,
* re-calculates each data hash and compares with the value stored in hash
* node.
*
* 1, if all hashes are valid
* 0, otherwise (or on error)
*/
-int fit_image_check_hashes(const void *fit, int image_noffset)
+int fit_image_verify(const void *fit, int image_noffset)
{
const void *data;
size_t size;
}
/**
- * fit_all_image_check_hashes - verify data intergity for all images
+ * fit_all_image_verify - verify data intergity for all images
* @fit: pointer to the FIT format image header
*
- * fit_all_image_check_hashes() goes over all images in the FIT and
+ * fit_all_image_verify() goes over all images in the FIT and
* for every images checks if all it's hashes are valid.
*
* returns:
* 1, if all hashes of all images are valid
* 0, otherwise (or on error)
*/
-int fit_all_image_check_hashes(const void *fit)
+int fit_all_image_verify(const void *fit)
{
int images_noffset;
int noffset;
printf(" Hash(es) for Image %u (%s): ", count++,
fit_get_name(fit, noffset, NULL));
- if (!fit_image_check_hashes(fit, noffset))
+ if (!fit_image_verify(fit, noffset))
return 0;
printf("\n");
}
if (verify) {
puts(" Verifying Hash Integrity ... ");
- if (!fit_image_check_hashes(fit, rd_noffset)) {
+ if (!fit_image_verify(fit, rd_noffset)) {
puts("Bad Data Hash\n");
bootstage_error(BOOTSTAGE_ID_FIT_RD_HASH);
return 0;
if (verify) {
puts(" Verifying Hash Integrity ... ");
- if (!fit_image_check_hashes(fit, fdt_noffset)) {
+ if (!fit_image_verify(fit, fdt_noffset)) {
fdt_error("Bad Data Hash");
return 0;
}
printf("Processing update '%s' :",
fit_get_name(fit, noffset, NULL));
- if (!fit_image_check_hashes(fit, noffset)) {
+ if (!fit_image_verify(fit, noffset)) {
printf("Error: invalid update hash, aborting\n");
ret = 1;
goto next_node;
int fit_set_hashes(void *fit);
int fit_image_set_hashes(void *fit, int image_noffset);
-int fit_image_check_hashes(const void *fit, int noffset);
-int fit_all_image_check_hashes(const void *fit);
+int fit_image_verify(const void *fit, int noffset);
+int fit_all_image_verify(const void *fit);
int fit_image_check_os(const void *fit, int noffset, uint8_t os);
int fit_image_check_arch(const void *fit, int noffset, uint8_t arch);
int fit_image_check_type(const void *fit, int noffset, uint8_t type);