From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Mon, 24 Jun 2019 12:14:03 -0700 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BF7C73092664; Mon, 24 Jun 2019 19:13:42 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-226.ams2.redhat.com [10.36.116.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id F11281001B00; Mon, 24 Jun 2019 19:13:37 +0000 (UTC) From: "Laszlo Ersek" To: edk2-devel-groups-io Cc: Ard Biesheuvel , Gary Lin , Guillaume GARDET , Julien Grall Subject: [PATCH] ArmVirtPkg: handle NETWORK_TLS_ENABLE in ArmVirtQemu* Date: Mon, 24 Jun 2019 21:13:36 +0200 Message-Id: <20190624191336.31611-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Mon, 24 Jun 2019 19:13:49 +0000 (UTC) Content-Transfer-Encoding: quoted-printable Port the [LibraryClasses], [PcdsFixedAtBuild] and [Components] settings that are related to NETWORK_TLS_ENABLE from OvmfPkg to ArmVirtPkg. ArmVirtXen is not modified because it doesn't include the edk2 network stack. (This change is now simpler than it would have been when TianoCore#1009 was originally filed, due to ArmVirtPkg consuming the NetworkPkg include fragments meanwhile, from TianoCore#1293 / commit 157a3b1aa50f.) The usage hints from "OvmfPkg/README", section "HTTPS Boot", apply. Cc: Ard Biesheuvel Cc: Gary Lin Cc: Guillaume GARDET Cc: Julien Grall Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1009 Signed-off-by: Laszlo Ersek --- Notes: Repo: https://github.com/lersek/edk2.git Branch: armvirt_tls_bz1009 ArmVirtPkg/ArmVirt.dsc.inc | 7 +++++++ ArmVirtPkg/ArmVirtQemu.dsc | 18 ++++++++++++++---- ArmVirtPkg/ArmVirtQemuKernel.dsc | 18 ++++++++++++++---- 3 files changed, 35 insertions(+), 8 deletions(-) diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc index 20bf011617a1..a4ae25d982a2 100644 --- a/ArmVirtPkg/ArmVirt.dsc.inc +++ b/ArmVirtPkg/ArmVirt.dsc.inc @@ -71,6 +71,9 @@ [LibraryClasses.common] =20 # Networking Requirements !include NetworkPkg/NetworkLibs.dsc.inc +!if $(NETWORK_TLS_ENABLE) =3D=3D TRUE + TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf +!endif =20 =20 # @@ -136,7 +139,11 @@ [LibraryClasses.common] # CryptoPkg libraries needed by multiple firmware features # IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf +!if $(NETWORK_TLS_ENABLE) =3D=3D TRUE + OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf +!else OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf +!endif BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf =20 # diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index cf28478977e1..7ae6702ac1f0 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -43,10 +43,6 @@ [Defines] !error "NETWORK_SNP_ENABLE is IA32/X64/EBC only" !endif =20 -!if $(NETWORK_TLS_ENABLE) =3D=3D TRUE - !error "NETWORK_TLS_ENABLE is tracked at " -!endif - !include NetworkPkg/NetworkDefines.dsc.inc =20 !include ArmVirtPkg/ArmVirt.dsc.inc @@ -113,6 +109,14 @@ [PcdsFixedAtBuild.common] gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x4000 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800 +!if $(NETWORK_TLS_ENABLE) =3D=3D TRUE + # + # The cumulative and individual VOLATILE variable size limits should b= e set + # high enough for accommodating several and/or large CA certificates. + # + gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x80000 + gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVolatileVariableSize|0x40000 +!endif =20 # Size of the region used by UEFI in permanent memory (Reserved 64MB) gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x04000000 @@ -372,6 +376,12 @@ [Components.common] # Networking stack # !include NetworkPkg/NetworkComponents.dsc.inc +!if $(NETWORK_TLS_ENABLE) =3D=3D TRUE + NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf { + + NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf + } +!endif =20 # # SCSI Bus and Disk Driver diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKer= nel.dsc index 596e59739cab..3b0f04967a4b 100644 --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc @@ -43,10 +43,6 @@ [Defines] !error "NETWORK_SNP_ENABLE is IA32/X64/EBC only" !endif =20 -!if $(NETWORK_TLS_ENABLE) =3D=3D TRUE - !error "NETWORK_TLS_ENABLE is tracked at " -!endif - !include NetworkPkg/NetworkDefines.dsc.inc =20 !include ArmVirtPkg/ArmVirt.dsc.inc @@ -118,6 +114,14 @@ [PcdsFixedAtBuild.common] gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x4000 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800 +!if $(NETWORK_TLS_ENABLE) =3D=3D TRUE + # + # The cumulative and individual VOLATILE variable size limits should b= e set + # high enough for accommodating several and/or large CA certificates. + # + gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x80000 + gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVolatileVariableSize|0x40000 +!endif =20 # Size of the region used by UEFI in permanent memory (Reserved 64MB) gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x04000000 @@ -356,6 +360,12 @@ [Components.common] # Networking stack # !include NetworkPkg/NetworkComponents.dsc.inc +!if $(NETWORK_TLS_ENABLE) =3D=3D TRUE + NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf { + + NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf + } +!endif =20 # # SCSI Bus and Disk Driver --=20 2.19.1.3.g30247aa5d201