2011-09-02 09:49:32 +02:00
|
|
|
## @file
|
2014-08-28 07:31:09 +02:00
|
|
|
# Provides security service of image verification
|
|
|
|
#
|
|
|
|
# This library hooks LoadImage() API to verify every image by the verification policy.
|
2011-09-02 09:49:32 +02:00
|
|
|
#
|
2012-06-12 10:28:43 +02:00
|
|
|
# Caution: This module requires additional review when modified.
|
|
|
|
# This library will have external input - PE/COFF image.
|
2014-08-28 07:31:09 +02:00
|
|
|
# This external input must be validated carefully to avoid security issues such as
|
|
|
|
# buffer overflow or integer overflow.
|
2012-06-12 10:28:43 +02:00
|
|
|
#
|
2014-08-28 07:31:09 +02:00
|
|
|
# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
|
2011-09-02 09:49:32 +02:00
|
|
|
# This program and the accompanying materials
|
|
|
|
# are licensed and made available under the terms and conditions of the BSD License
|
|
|
|
# which accompanies this distribution. The full text of the license may be found at
|
|
|
|
# http://opensource.org/licenses/bsd-license.php
|
|
|
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
|
#
|
|
|
|
##
|
|
|
|
|
|
|
|
[Defines]
|
|
|
|
INF_VERSION = 0x00010005
|
2014-08-28 07:31:09 +02:00
|
|
|
BASE_NAME = DxeImageVerificationLib
|
|
|
|
MODULE_UNI_FILE = DxeImageVerificationLib.uni
|
2011-09-02 09:49:32 +02:00
|
|
|
FILE_GUID = 0CA970E1-43FA-4402-BC0A-81AF336BFFD6
|
|
|
|
MODULE_TYPE = DXE_DRIVER
|
|
|
|
VERSION_STRING = 1.0
|
2014-11-14 09:41:12 +01:00
|
|
|
LIBRARY_CLASS = NULL|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER
|
2011-09-02 09:49:32 +02:00
|
|
|
CONSTRUCTOR = DxeImageVerificationLibConstructor
|
|
|
|
|
|
|
|
#
|
|
|
|
# The following information is for reference only and not required by the build tools.
|
|
|
|
#
|
|
|
|
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
|
|
|
#
|
|
|
|
|
|
|
|
[Sources]
|
|
|
|
DxeImageVerificationLib.c
|
|
|
|
DxeImageVerificationLib.h
|
2013-09-18 07:31:18 +02:00
|
|
|
Measurement.c
|
2011-09-02 09:49:32 +02:00
|
|
|
|
|
|
|
[Packages]
|
|
|
|
MdePkg/MdePkg.dec
|
|
|
|
MdeModulePkg/MdeModulePkg.dec
|
|
|
|
CryptoPkg/CryptoPkg.dec
|
|
|
|
SecurityPkg/SecurityPkg.dec
|
|
|
|
|
|
|
|
[LibraryClasses]
|
|
|
|
MemoryAllocationLib
|
|
|
|
BaseLib
|
|
|
|
UefiLib
|
|
|
|
UefiBootServicesTableLib
|
|
|
|
UefiRuntimeServicesTableLib
|
|
|
|
BaseMemoryLib
|
|
|
|
DebugLib
|
|
|
|
DevicePathLib
|
|
|
|
BaseCryptLib
|
|
|
|
SecurityManagementLib
|
2012-04-24 05:00:32 +02:00
|
|
|
PeCoffLib
|
2013-09-18 07:31:18 +02:00
|
|
|
TpmMeasurementLib
|
2011-09-02 09:49:32 +02:00
|
|
|
|
|
|
|
[Protocols]
|
2014-08-28 07:31:09 +02:00
|
|
|
gEfiFirmwareVolume2ProtocolGuid ## SOMETIMES_CONSUMES
|
|
|
|
gEfiBlockIoProtocolGuid ## SOMETIMES_CONSUMES
|
|
|
|
gEfiSimpleFileSystemProtocolGuid ## SOMETIMES_CONSUMES
|
|
|
|
|
2011-09-02 09:49:32 +02:00
|
|
|
[Guids]
|
2014-08-28 07:31:09 +02:00
|
|
|
## SOMETIMES_CONSUMES ## Variable:L"DB"
|
|
|
|
## SOMETIMES_CONSUMES ## Variable:L"DBX"
|
2014-11-14 09:41:12 +01:00
|
|
|
## SOMETIMES_CONSUMES ## Variable:L"DBT"
|
2014-08-28 07:31:09 +02:00
|
|
|
## PRODUCES ## SystemTable
|
|
|
|
## CONSUMES ## SystemTable
|
2011-09-02 09:49:32 +02:00
|
|
|
gEfiImageSecurityDatabaseGuid
|
2014-08-28 07:31:09 +02:00
|
|
|
|
|
|
|
## SOMETIMES_CONSUMES ## GUID # Unique ID for the type of the signature.
|
|
|
|
## SOMETIMES_PRODUCES ## GUID # Unique ID for the type of the signature.
|
2011-09-02 09:49:32 +02:00
|
|
|
gEfiCertSha1Guid
|
2014-11-14 09:41:12 +01:00
|
|
|
|
2014-08-28 07:31:09 +02:00
|
|
|
## SOMETIMES_CONSUMES ## GUID # Unique ID for the type of the signature.
|
|
|
|
## SOMETIMES_PRODUCES ## GUID # Unique ID for the type of the signature.
|
2011-09-02 09:49:32 +02:00
|
|
|
gEfiCertSha256Guid
|
2014-08-28 07:31:09 +02:00
|
|
|
|
2014-11-14 09:41:12 +01:00
|
|
|
## SOMETIMES_CONSUMES ## GUID # Unique ID for the type of the signature.
|
|
|
|
## SOMETIMES_PRODUCES ## GUID # Unique ID for the type of the signature.
|
|
|
|
gEfiCertSha384Guid
|
|
|
|
|
|
|
|
## SOMETIMES_CONSUMES ## GUID # Unique ID for the type of the signature.
|
|
|
|
## SOMETIMES_PRODUCES ## GUID # Unique ID for the type of the signature.
|
|
|
|
gEfiCertSha512Guid
|
|
|
|
|
2014-08-28 07:31:09 +02:00
|
|
|
gEfiCertX509Guid ## SOMETIMES_CONSUMES ## GUID # Unique ID for the type of the signature.
|
2014-11-14 09:41:12 +01:00
|
|
|
gEfiCertX509Sha256Guid ## SOMETIMES_CONSUMES ## GUID # Unique ID for the type of the signature.
|
|
|
|
gEfiCertX509Sha384Guid ## SOMETIMES_CONSUMES ## GUID # Unique ID for the type of the signature.
|
|
|
|
gEfiCertX509Sha512Guid ## SOMETIMES_CONSUMES ## GUID # Unique ID for the type of the signature.
|
2014-08-28 07:31:09 +02:00
|
|
|
gEfiCertPkcs7Guid ## SOMETIMES_CONSUMES ## GUID # Unique ID for the type of the certificate.
|
2014-11-14 09:41:12 +01:00
|
|
|
|
2011-09-02 09:49:32 +02:00
|
|
|
[Pcd]
|
2014-08-28 07:31:09 +02:00
|
|
|
gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy ## SOMETIMES_CONSUMES
|
|
|
|
gEfiSecurityPkgTokenSpaceGuid.PcdRemovableMediaImageVerificationPolicy ## SOMETIMES_CONSUMES
|
|
|
|
gEfiSecurityPkgTokenSpaceGuid.PcdFixedMediaImageVerificationPolicy ## SOMETIMES_CONSUMES
|