From patchwork Wed Oct 14 15:45:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: andrej@inversepath.com X-Patchwork-Id: 530242 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id E428B140FDA for ; Thu, 15 Oct 2015 02:56:52 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 787614B689; Wed, 14 Oct 2015 17:56:48 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4760MybTDspb; Wed, 14 Oct 2015 17:56:48 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DC0804B67F; Wed, 14 Oct 2015 17:56:47 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9DC3A4B67F for ; Wed, 14 Oct 2015 17:56:45 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Yp27SHDCP5hR for ; Wed, 14 Oct 2015 17:56:45 +0200 (CEST) X-Greylist: delayed 659 seconds by postgrey-1.34 at theia; Wed, 14 Oct 2015 17:56:41 CEST X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from core.inversepath.com (core.inversepath.com [91.121.184.96]) by theia.denx.de (Postfix) with ESMTPS id 64D804B65B for ; Wed, 14 Oct 2015 17:56:41 +0200 (CEST) Received: from stjenka.localdomain (localhost.localdomain [127.0.0.1]) by core.inversepath.com (8.14.3/8.14.3) with ESMTP id t9EFje7E008123; Wed, 14 Oct 2015 17:45:41 +0200 From: andrej@inversepath.com To: u-boot@lists.denx.de Date: Wed, 14 Oct 2015 17:45:40 +0200 Message-Id: <1444837540-3047-1-git-send-email-andrej@inversepath.com> X-Mailer: git-send-email 2.1.4 Cc: Tom Rini Subject: [U-Boot] [PATCH] image-fit: Fix signature checking X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Andrej Rosano On signature verification failures fit_image_verify() should exit with error. Signed-off-by: Andrej Rosano --- common/image-fit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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("+ "); }