image-fit: Fix signature checking
authorAndrej Rosano <andrej@inversepath.com>
Wed, 14 Oct 2015 15:45:40 +0000 (17:45 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 19 Oct 2015 21:06:16 +0000 (17:06 -0400)
On signature verification failures fit_image_verify() should
exit with error.

Signed-off-by: Andrej Rosano <andrej@inversepath.com>
common/image-fit.c

index 28f7aa83ba4e6b60882227a2670a69c27c8d76ca..c531ee74d7fde55c5ac52edb3949fb824954e750 100644 (file)
@@ -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("+ ");
                }