Skip to content

Commit 7298a73

Browse files
committed
bootutil/crypto: Escalate sha errors when hashing images
Thus far, hashing errors were silently ignored when hashing images. Signed-off-by: kkrentz <[email protected]>
1 parent 85b5642 commit 7298a73

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

boot/bootutil/src/bootutil_img_hash.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,9 @@ bootutil_img_hash(struct boot_loader_state *state,
190190
}
191191
#endif /* MCUBOOT_RAM_LOAD */
192192
#endif /* MCUBOOT_HASH_STORAGE_DIRECTLY */
193-
bootutil_sha_finish(&sha_ctx, hash_result);
193+
rc = bootutil_sha_finish(&sha_ctx, hash_result);
194194
bootutil_sha_drop(&sha_ctx);
195195

196-
return 0;
196+
return rc;
197197
}
198198
#endif /* !MCUBOOT_SIGN_PURE */

0 commit comments

Comments
 (0)