From patchwork Tue Jul 27 09:10:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 486670 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:1185:0:0:0:0 with SMTP id f5csp38164jas; Tue, 27 Jul 2021 02:13:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRUc7dCzs2dELHCgW6ls9RNlTXpPfo3OokYV+AFQrKuKEcvuTXxFQLO3KaUQfeTnyy1tCx X-Received: by 2002:a17:906:24d3:: with SMTP id f19mr9877527ejb.391.1627377214814; Tue, 27 Jul 2021 02:13:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627377214; cv=none; d=google.com; s=arc-20160816; b=VEXE83R5Jpwayn8ZIgzyYpXe43Uhw+9b/zbp25n6CDLwORssM+LOMR6nG1vxy2zSNn 5I5S7c120389+214qUqfRYZdcSUuKXZzNqQ0vyF1yubRyCOwRn0mV35u0KBtHd4+t4rQ 44oeIPmyNVZvUR6wNAnkiwOz9ptjYDRGplQ65add9Qt6rCm5Y6VOb+bw6n2SkySWfsDK GffL2tt3WeC67tlFbfEic1j2zR4sM+tnBQbGVTlHX8q5paAaXALPkkvhnDDG9aVmVsbn Izrpu47JLxn1hgypZpAoJwM3nt+ogt56WEsjK9GY+H3/L6lt6u0NohONCtg9ib2//jUk QxPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=m0fZBfOpFtkibzNSmeRc44zmLSFHl7il0D55qyIOWDE=; b=roig6fELFKDHy6CcMCw97ch08uTJC3Jcr28fV2WmWICLYnYrkVvHE8IApLZZYn4rW/ /GXGlEANXjKqS4nCPYunCSGRV8q9SqWh12phfQORcezZjfc0Fg8TkkaE6Nucz99NRjJt TaHiN0Pjhs5nJVbinHZWaXYsacp1+CirK5+gVDsiDU3rz+WOA74NloqwPHTYMAwcrDFx W3J97eO5ZWAAnNjQy+j1AMbh9zfPbnc1LYGPb0pEclHOWAWjP+lfg6J618jZYAQK4yxB Qdwd4Qmn4EZeX5mEov7ni0LFZQYKUtqiOdK80rqJwjgjp8rs+N1TLw6/YJfOko/kBBgv 5nwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MWuurUal; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id g16si2507443ejm.150.2021.07.27.02.13.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jul 2021 02:13:34 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MWuurUal; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DED3D83445; Tue, 27 Jul 2021 11:13:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="MWuurUal"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C106983458; Tue, 27 Jul 2021 11:12:42 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C18E183448 for ; Tue, 27 Jul 2021 11:12:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pl1-x632.google.com with SMTP id e21so10556948pla.5 for ; Tue, 27 Jul 2021 02:12:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=m0fZBfOpFtkibzNSmeRc44zmLSFHl7il0D55qyIOWDE=; b=MWuurUalEN0LrIKmLkdzqF2xk4fB7G2+Z0p2s4+ttpE+QCJuto7EHdHp1xhYoaCOLe 87NbfV8cm5O60JX/TfArFxXSXdKS94uhgT6ZnVQh0AbnBoRZEdk/Sk6Q2m8f8ulMqOtt QL06SElJV67w282aFIUq3WVF71oE/BfSoaEwue4xYpksgnMoq8DwuNocuo9LDxcKOV9U 6+PxZRxrCRi+F+0VT/vuE3nJSeeV+i148JmS31vbCervxM4RNdGs3feJaJEtUhoTyk7V zfRfOGy/JWOUJx0y+1F0wVN6BZMetX8VmxtZb7cgN4OTjNA/uH53WkYDOeBtYrkQiwFb mLTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=m0fZBfOpFtkibzNSmeRc44zmLSFHl7il0D55qyIOWDE=; b=g4rj3+pXNxLVuMgVZnLY9qlbiphDmwCcOD7ad5VRmppgUVFPmjFzRUuhhZKkM/IEit bWhJY+ZgjRGa69G5Mi0Tm1qV9FXzkQmvBCnWJBZNPFTBO0bMaAJXfNnwbNelgT+0102l 36wH/OqECxJyiYpRzuZXlMgt/LbKgRy+yiwapTbHJPK4QwJ2P24EmrO4lot+wjcDh+WF CvzUvZTQQRjsSpoQYw/iBoHwuZLxZL1vsC3f8N6PD4eM3/EE9NtG1U0ipmFap/y/SBFm v8DZ4fINgKZRAnZ27+UF/tIFb8DlM4BNiR+m4yS/T1IHUKVNqISbnIV4p8JkvHTC762y d7Iw== X-Gm-Message-State: AOAM532Sjsz+Hc8AwqtV6TGyqm/CBlmH0BqI5TPr/dhSF9QQJYGzVJYG F97W0I9JVBnK7kDUkfu1NewaAA== X-Received: by 2002:a17:902:f68f:b029:12c:228a:5226 with SMTP id l15-20020a170902f68fb029012c228a5226mr7981017plg.61.1627377144094; Tue, 27 Jul 2021 02:12:24 -0700 (PDT) Received: from localhost.localdomain (pdb6272ed.tkyea130.ap.so-net.ne.jp. [219.98.114.237]) by smtp.gmail.com with ESMTPSA id q13sm2008218pjq.10.2021.07.27.02.12.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jul 2021 02:12:23 -0700 (PDT) From: AKASHI Takahiro To: xypron.glpk@gmx.de, agraf@csgraf.de, trini@konsulko.com, sjg@chromium.org Cc: ilias.apalodimas@linaro.org, sughosh.ganu@linaro.org, masami.hiramatsu@linaro.org, u-boot@lists.denx.de, AKASHI Takahiro Subject: [PATCH v2 4/9] efi_loader: ease the file path check for public key Date: Tue, 27 Jul 2021 18:10:49 +0900 Message-Id: <20210727091054.512050-5-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210727091054.512050-1-takahiro.akashi@linaro.org> References: <20210727091054.512050-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean The check for CONFIG_EFI_CAPSULE_KEY_PATH: ifeq ("$(wildcard $(EFI_CAPSULE_KEY_PATH))","") does not allow users to specify a relative path for including a public key binary. This is fine for most of all cases, but it will make it difficult to add pytest test cases as pre-created keys/certificates are placed in "test" directory. So just ease the check, still causing an error if the specified file does not exist at compiling efi_capsule_key.S. Signed-off-by: AKASHI Takahiro --- lib/efi_loader/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.31.0 diff --git a/lib/efi_loader/Makefile b/lib/efi_loader/Makefile index 9b369430e258..fca0da4d131e 100644 --- a/lib/efi_loader/Makefile +++ b/lib/efi_loader/Makefile @@ -21,8 +21,9 @@ targets += helloworld.o endif ifeq ($(CONFIG_EFI_CAPSULE_AUTHENTICATE),y) -EFI_CAPSULE_KEY_PATH := $(subst $\",,$(CONFIG_EFI_CAPSULE_KEY_PATH)) -ifeq ("$(wildcard $(EFI_CAPSULE_KEY_PATH))","") +#EFI_CAPSULE_KEY_PATH := $(subst $\",,$(CONFIG_EFI_CAPSULE_KEY_PATH)) +#ifeq ("$(wildcard $(EFI_CAPSULE_KEY_PATH))","") +ifeq ($(CONFIG_EFI_CAPSULE_KEY_PATH),"") $(error .esl cerificate not found. Configure your CONFIG_EFI_CAPSULE_KEY_PATH) endif endif