audk/OvmfPkg/Library
Laszlo Ersek 9c7d0d4992 OvmfPkg/TlsAuthConfigLib: configure trusted CA certs for HTTPS boot
Introduce TlsAuthConfigLib to read the list of trusted CA certificates
from fw_cfg and to store it to EFI_TLS_CA_CERTIFICATE_VARIABLE.

The fw_cfg file is formatted by the "p11-kit" and "update-ca-trust"
utilities on the host side, so that the host settings take effect in guest
HTTPS boot as well. QEMU forwards the file intact to the firmware. The
contents are sanity-checked by NetworkPkg/HttpDxe code that was added in
commit 0fd13678a6.

Link TlsAuthConfigLib via NULL resolution into TlsAuthConfigDxe. This sets
EFI_TLS_CA_CERTIFICATE_VARIABLE in time for both
NetworkPkg/TlsAuthConfigDxe (for possible HII interaction with the user)
and for NetworkPkg/HttpDxe (for the effective TLS configuration).

The file formatted by "p11-kit" can be large. On a RHEL-7 host, the the
Mozilla CA root certificate bundle -- installed with the "ca-certificates"
package -- is processed into a 182KB file. Thus, create
EFI_TLS_CA_CERTIFICATE_VARIABLE as a volatile & boot-time only variable.
Also, in TLS_ENABLE builds, set the cumulative limit for volatile
variables (PcdVariableStoreSize) to 512KB, and the individual limit for
the same (PcdMaxVolatileVariableSize) to 256KB.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Gary Ching-Pang Lin <glin@suse.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Gary Lin <glin@suse.com>
Tested-by: Gary Lin <glin@suse.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2018-03-30 21:18:35 +02:00
..
AcpiTimerLib OvmfPkg/AcpiTimerLib: list "AcpiTimerLib.h" in the INF files 2018-03-13 14:30:37 +01:00
BaseMemEncryptSevLib OvmfPkg:Fix VS2012 build failure 2018-03-28 09:58:49 +08:00
DxePciLibI440FxQ35 OvmfPkg: add DxePciLibI440FxQ35 2016-03-10 21:28:29 +01:00
EmuVariableFvbLib OvmfPkg EMU FVB: Add 2 functions to PlatformFvbLib 2011-01-09 03:51:16 +00:00
LoadLinuxLib OvmfPkg/LoadLinuxLib: list "LoadLinuxLib.h" in the INF file 2018-03-13 14:30:41 +01:00
LockBoxLib OvmfPkg/LockBoxLib: list "LockBoxLib.h" in the INF files 2018-03-13 14:30:43 +01:00
NvVarsFileLib OvmfPkg/NvVarsFileLib: list "NvVarsFileLib.h" in the INF file 2018-03-13 14:30:52 +01:00
PciHostBridgeLib OvmfPkg/PciHostBridgeLib: clear PCI aperture vars for (re)init 2018-03-15 08:26:05 +00:00
PlatformBootManagerLib OvmfPkg/PlatformBootManagerLib: process "-kernel" before boot devices 2018-03-16 19:58:30 +01:00
PlatformDebugLibIoPort OvmfPkg/PlatformDebugLibIoPort: list "DebugLibDetect.h" in the INF files 2018-03-13 14:30:54 +01:00
PlatformFvbLibNull OvmfPkg EMU FVB: Add 2 functions to PlatformFvbLib 2011-01-09 03:51:16 +00:00
PlatformHasIoMmuLib OvmfPkg: Add PlatformHasIoMmuLib 2017-07-10 21:17:28 -07:00
PlatformSecureLib OvmfPkg: Add custom mode setup if the Secure Boot build option is specified. 2012-04-04 17:35:06 +00:00
QemuBootOrderLib OvmfPkg/QemuBootOrderLib: add ConnectDevicesFromQemu() 2018-03-14 11:24:24 +01:00
QemuFwCfgLib OvmfPkg/QemuFwCfgDxeLib: SEV: zero FW_CFG_DMA_ACCESS before decrypting it 2017-08-29 22:44:33 +02:00
QemuFwCfgS3Lib OvmfPkg/QemuFwCfgS3Lib: Fix VS tool chain build failure 2017-03-15 21:18:40 -07:00
ResetSystemLib OvmfPkg/ResetSystemLib: Implement ResetPlatformSpecific 2016-09-02 10:07:15 +08:00
SerializeVariablesLib OvmfPkg/SerializeVariablesLib: list "SerializeVariablesLib.h" in INF file 2018-03-13 14:30:59 +01:00
SmbiosVersionLib OvmfPkg/SmbiosVersionLib: eliminate unchecked PcdSetXX() calls 2016-10-25 10:46:19 +02:00
SmmCpuFeaturesLib OvmfPkg/SmmCpuFeaturesLib: SEV: encrypt+free pages of init. save state map 2018-03-06 13:30:35 +01:00
TlsAuthConfigLib OvmfPkg/TlsAuthConfigLib: configure trusted CA certs for HTTPS boot 2018-03-30 21:18:35 +02:00
VirtioLib OvmfPkg/VirtioLib: change the parameter of VirtioAppendDesc() to UINT64 2017-08-25 10:42:19 +02:00
VirtioMmioDeviceLib OvmfPkg/VirtioMmioDeviceLib: improve style of mMmioDeviceProtocolTemplate 2018-03-13 14:31:05 +01:00
XenConsoleSerialPortLib OvmfPkg/XenConsoleSerialPortLib: don't include <Uefi/UefiBaseType.h> 2016-10-26 12:03:39 +02:00
XenHypercallLib OvmfPkg/XenHypercallLib: enable virt extensions for ARM 2017-11-17 09:56:50 +00:00
XenIoMmioLib OvmfPkg/XenIoMmioLib: add missing MemoryAllocationLib dependency to INF 2016-04-13 17:26:06 +02:00