From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web10.8635.1634818862768969827 for ; Thu, 21 Oct 2021 05:21:03 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=izINf4aP; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634818861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xUwvAWkkUP3L62FVEWcAVWy9N1W+CSzG8aI+hfeJklo=; b=izINf4aPyFEDqOELx2VtiENP7/GD/PkZxWtzkc+VNuUHuc9G7LH8himOoTQAdFH7xSGH8L 45+zVxxYDHcff3nrROzAGLNvNWxTqJvO7MuFhPg+jH5Yki7a0pdVl2AhX2rrIU6tYPpzrI nRV+Jb6+hVHXtNXdkBUwzI6L3IXrsCM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-552-g7WXsgPtM96JEgxtgBNSrQ-1; Thu, 21 Oct 2021 08:20:59 -0400 X-MC-Unique: g7WXsgPtM96JEgxtgBNSrQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7ECF71966320; Thu, 21 Oct 2021 12:20:57 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.23]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4126860657; Thu, 21 Oct 2021 12:20:57 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id C8D6D180090F; Thu, 21 Oct 2021 14:20:03 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Gerd Hoffmann , James Bottomley , Min Xu , Jordan Justen , Erdem Aktas , Stefan Berger , Ard Biesheuvel , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Jiewen Yao , Tom Lendacky , Brijesh Singh Subject: [PATCH 4/4] OvmfPkg: add TPM2_SHA1_ENABLE build option Date: Thu, 21 Oct 2021 14:20:03 +0200 Message-Id: <20211021122003.2008499-5-kraxel@redhat.com> In-Reply-To: <20211021122003.2008499-1-kraxel@redhat.com> References: <20211021122003.2008499-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Allows to compile OVMF without HashInstanceLibSha1, i.e. no SHA1 hash support in TPM/TCG modules. Signed-off-by: Gerd Hoffmann --- OvmfPkg/OvmfTpmComponentsDxe.dsc.inc | 2 ++ OvmfPkg/OvmfTpmComponentsPei.dsc.inc | 2 ++ OvmfPkg/OvmfTpmDefines.dsc.inc | 1 + 3 files changed, 5 insertions(+) diff --git a/OvmfPkg/OvmfTpmComponentsDxe.dsc.inc b/OvmfPkg/OvmfTpmComponentsDxe.dsc.inc index 6806eb245e2b..1952a848b17c 100644 --- a/OvmfPkg/OvmfTpmComponentsDxe.dsc.inc +++ b/OvmfPkg/OvmfTpmComponentsDxe.dsc.inc @@ -8,7 +8,9 @@ Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterDxe.inf NULL|SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.inf HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf +!if $(TPM2_SHA1_ENABLE) == TRUE NULL|SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.inf +!endif NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf NULL|SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384.inf NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512.inf diff --git a/OvmfPkg/OvmfTpmComponentsPei.dsc.inc b/OvmfPkg/OvmfTpmComponentsPei.dsc.inc index 94bc124f9b78..fbe905603312 100644 --- a/OvmfPkg/OvmfTpmComponentsPei.dsc.inc +++ b/OvmfPkg/OvmfTpmComponentsPei.dsc.inc @@ -13,7 +13,9 @@ SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf { HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.inf +!if $(TPM2_SHA1_ENABLE) == TRUE NULL|SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.inf +!endif NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf NULL|SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384.inf NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512.inf diff --git a/OvmfPkg/OvmfTpmDefines.dsc.inc b/OvmfPkg/OvmfTpmDefines.dsc.inc index de55cbdcf852..7db7ad7e7934 100644 --- a/OvmfPkg/OvmfTpmDefines.dsc.inc +++ b/OvmfPkg/OvmfTpmDefines.dsc.inc @@ -7,3 +7,4 @@ # has no effect unless TPM2_ENABLE == TRUE DEFINE TPM1_ENABLE = TRUE + DEFINE TPM2_SHA1_ENABLE = TRUE -- 2.31.1