diff mbox

[U-Boot] image-fit: Fix signature checking

Message ID 1444837540-3047-1-git-send-email-andrej@inversepath.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

andrej@inversepath.com Oct. 14, 2015, 3:45 p.m. UTC
From: Andrej Rosano <andrej@inversepath.com>

On signature verification failures fit_image_verify() should
exit with error.

Signed-off-by: Andrej Rosano <andrej@inversepath.com>
---
 common/image-fit.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Tom Rini Oct. 20, 2015, 12:06 a.m. UTC | #1
On Wed, Oct 14, 2015 at 05:45:40PM +0200, andrej@inversepath.com wrote:

> From: Andrej Rosano <andrej@inversepath.com>
> 
> On signature verification failures fit_image_verify() should
> exit with error.
> 
> Signed-off-by: Andrej Rosano <andrej@inversepath.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/common/image-fit.c b/common/image-fit.c
index 28f7aa8..c531ee7 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -1030,8 +1030,10 @@  int fit_image_verify(const void *fit, int image_noffset)
 					strlen(FIT_SIG_NODENAME))) {
 			ret = fit_image_check_sig(fit, noffset, data,
 							size, -1, &err_msg);
-			if (ret)
+			if (ret) {
 				puts("- ");
+				goto error;
+			}
 			else
 				puts("+ ");
 		}