From patchwork Wed May 12 06:59:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 435461 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp4558505jao; Wed, 12 May 2021 00:00:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5zQsGj2YMdzP8ZYKmaawvfaXzleLdiThX6zjYJa+qTR/Tmnb8Qv5Ih8CiA4YsfJl/Z9pE X-Received: by 2002:a17:907:3f99:: with SMTP id hr25mr36625984ejc.231.1620802853358; Wed, 12 May 2021 00:00:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620802853; cv=none; d=google.com; s=arc-20160816; b=ONHLyk1isyu8INAaRRcogjOp6xJ9ppvFW9GMIxKwLeUSLk9W6PBZsXh/nMDs8xMkRm r6BbabMay7JthF1xd+rXQk2waK8kO82/qfvsPncoo0Ss87hCqMBV+6unD+TeLlum1vaD xdgzGIBy2JQKZNsj7X61Th6zD+ic5jdQlxgpP63wzUW4s7xDqz85DOr7/fmcboalBwTM n3FBlK1CKahIEaRaFvuceKzyi7iVQ47G47p1iuwEQffu/TZU3FavlmoAuuV6U7szb9wm FKMYtN/VPMSohRhmOS96lKBBbi4YchmzWP1G9OsTD/szEUtwFwdTrISI/n3l9BNJp1gA NtLw== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=zCld6Lxx6b5EvU9h/AW3Prdo1hEAI9f3BoP0q9UvhGE=; b=tDkLx0CYa/VhaUvBs+UvmJQC6tOfdCG278NPoRrlIX4uHHzI4228dPRGufqsOnaX7Q DSV4TqxwRCojuVvKuVzsxGyQiMwWBdbMviOTES4sMklTZg9q6TeDGtmAeiRo39v8krCg 1j90bdry04mSaZzt3dC86YjNhb5aIPRMCqVBK+i6sJtv/9yRhmjfJXg8JG64FkgLPuNj SfHDHApnY/sval/HBlsEnBCPqW3bev5ytH5KNQx/jTvkCN1zsp4cHfwWE0q6W2zACqlV LNk0McgA26zAAMpj5BTRGZZf7lAo/aIlUfQXEVU90Km6WcnyI8vwvZKBajWz72RHIsAF O/AQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oh3dyfJ5; 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 z18si19342952edl.459.2021.05.12.00.00.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 May 2021 00:00:53 -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=oh3dyfJ5; 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 92E1282D54; Wed, 12 May 2021 09:00: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="oh3dyfJ5"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1E08882D56; Wed, 12 May 2021 09:00:25 +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-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) (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 5EEDA82D4B for ; Wed, 12 May 2021 09:00:15 +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=masahisa.kojima@linaro.org Received: by mail-pg1-x52e.google.com with SMTP id i14so17529384pgk.5 for ; Wed, 12 May 2021 00:00:15 -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; bh=zCld6Lxx6b5EvU9h/AW3Prdo1hEAI9f3BoP0q9UvhGE=; b=oh3dyfJ5nd/QL/8FtyxlrPSLsvFCm6FS53E0Ce2f+DfuQooEUkSvXeJxfCsG9MSVa1 jwpahZVt4xaOdTFh5mOzr15KSoW8XR9rcPAgtwubUgJTkWVola7kcuPFHdls681mFurC 4T2Vd9FPcEePEoUTuI7TXSzwHiA7qKK51BnmY8Dwo2av9Bg0IdwsLmzEoiYngEaWHqJz SoYRnxAZiU3TkZm0xUt/VYIEXNdiiIWLC5TN7WhCw9NFdTUQkRKeo37z75SNrNyzjRQt oyYuzjhqjALQ+E8HDrSOWUqnHOOKM82wgjwgOykY8RDERPwGiboyG1JWgdMerlt7lQWj 2VAQ== 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; bh=zCld6Lxx6b5EvU9h/AW3Prdo1hEAI9f3BoP0q9UvhGE=; b=M29f/tKUiHlML3tu3RSxfiaAipFaGueG3Lr4PMFegaDqT+W6m0sIzT1iLLR0fbqqPh NSQEIwL1zSujv8A6JsgmU06eyo/CB1iPThQDe6hS43h+VfGscCzeiSJ1L7HEwGnSfsA5 q/ZO+D5Q2VmOxC5qWpLys3MJWZOIYxqnNIit2RnG4Unqm/8VdyBRyG5jBbf1Lpi237T4 iMTQ0rR4ODEVbwBT3fqdeeXA/5OAxdIvJTE8rJfrId5oV6iYlkPhK2HIzRxXAoW9K8OV 7io0YLZawXYnW5FtO4lAjKponREFriqM/0MFsQtfBrctA2q7hFPDQS5Xvinzpruy4NdU H0pw== X-Gm-Message-State: AOAM532R6P/Q4/YYArLZ2p/yweGDnPuMa08Gkw88UjuJjvtlotu48gMd XwlWfyWCwvmAigz2dnb5a3GGqw== X-Received: by 2002:a63:7986:: with SMTP id u128mr34541240pgc.223.1620802813784; Wed, 12 May 2021 00:00:13 -0700 (PDT) Received: from localhost.localdomain ([2400:2411:502:a100:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id in16sm15956081pjb.14.2021.05.12.00.00.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 May 2021 00:00:13 -0700 (PDT) From: Masahisa Kojima To: Heinrich Schuchardt Cc: Alexander Graf , Simon Glass , Ilias Apalodimas , Masahisa Kojima , Dhananjay Phadke , Takahiro Akashi , u-boot@lists.denx.de Subject: [PATCH v4 3/3] efi_loader: add required option to use hash_calculate() Date: Wed, 12 May 2021 15:59:47 +0900 Message-Id: <20210512065947.23998-4-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210512065947.23998-1-masahisa.kojima@linaro.org> References: <20210512065947.23998-1-masahisa.kojima@linaro.org> 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.102.4 at phobos.denx.de X-Virus-Status: Clean Build error occurs when CONFIG_EFI_SECURE_BOOT/ CONFIG_EFI_CAPSULE_AUTHENTICATE/CONFIG_EFI_TCG2_PROTOCOL is enabled, because hash-checksum.c is not compiled. With the following commit, commit 0bcb28dfb946 ("lib: Rename rsa-checksum.c to hash-checksum.c") CONFIG_FIT_SIGNATURE option is required to use hash_calculate() function. This commit adds CONFIG_FIT_SIGNATURE option in Kconfig, and missing required options for CONFIG_EFI_TCG2_PROTOCOL. Signed-off-by: Masahisa Kojima --- Changes in v4: - newly added in this patch series, due to rebasing the base code. lib/efi_loader/Kconfig | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.17.1 diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig index b76e77180e..93463fb362 100644 --- a/lib/efi_loader/Kconfig +++ b/lib/efi_loader/Kconfig @@ -175,6 +175,7 @@ config EFI_CAPSULE_AUTHENTICATE select PKCS7_VERIFY select IMAGE_SIGN_INFO select EFI_SIGNATURE_SUPPORT + select FIT_SIGNATURE default n help Select this option if you want to enable capsule @@ -302,6 +303,12 @@ config EFI_RNG_PROTOCOL config EFI_TCG2_PROTOCOL bool "EFI_TCG2_PROTOCOL support" depends on TPM_V2 + select FIT_SIGNATURE + select SHA1 + select SHA256 + select SHA512_ALGO + select SHA384 + select SHA512 help Provide a EFI_TCG2_PROTOCOL implementation using the TPM hardware of the platform. @@ -338,6 +345,7 @@ config EFI_SECURE_BOOT select PKCS7_MESSAGE_PARSER select PKCS7_VERIFY select EFI_SIGNATURE_SUPPORT + select FIT_SIGNATURE default n help Select this option to enable EFI secure boot support.