summaryrefslogtreecommitdiffstats
path: root/SecurityPkg
Commit message (Collapse)AuthorAgeFilesLines
* SecurityPkg: Update TCG PFP spec revision.Zhang, Chao B2018-11-214-6/+10
| | | | | | | | | | | | | UEFI TCG has aligned with TCG PFP 1.03 v51 along with Errata Version 1.0. Update spec version accordingly. Spec Link: https://trustedcomputinggroup.org/wp-content/uploads/PC-ClientSpecific_Platform_Profile_for_TPM_2p0_Systems_v51.pdf https://trustedcomputinggroup.org/wp-content/uploads/PC-Client-Specific-Platform-Firmware-Profile-for-TPM-2-0-v1p03_r51-errata-v1p0_170426.pdf Cc: Yao Jiewen <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhang, Chao B <chao.b.zhang@intel.com> Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
* SecurityPkg/Include/Library/TcgStorageOpalLib.h: Update Pyrite spec revision.Eric Dong2018-10-261-2/+2
| | | | | | | | | Pyrite 2.0 spec has been published, update the spec link info for this file. Cc: Hao Wu <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* SecurityPkg/Tcg2Dxe: Remove unused PCDsshenglei2018-09-301-6/+0
| | | | | | | | | | | | | | | | | | The PCDs below are unused, so they have been removed from inf. gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemId gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemTableId gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemRevision gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultCreatorId gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultCreatorRevision Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: shenglei <shenglei.zhang@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* SecurityPkg/Tcg2ConfigPei: Remove an unused PCDshenglei2018-09-301-1/+0
| | | | | | | | | | | | | The PCD below is unused, so it has been removed from inf. gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: shenglei <shenglei.zhang@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* SecurityPkg/TcgStorageOpalLib: Fixed correct user password not works issue.Eric Dong2018-09-211-1/+0
| | | | | | | | | | | | | | After admin password reach the TryLimit value, code logic will direct return error password result no matter which password been inputted. So even correct user password will return TryLimit error. Now update code logic to also check user password. Only when both user/admin password reach the TryLimit count, code will return exceed TryLimit error. Change-Id: I17fbd1425b77150eb933a5002a1f87a0f0032e9b Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* SecurityPkg: remove PE/COFF header workaround for ELILO on IPFArd Biesheuvel2018-09-204-101/+25
| | | | | | | | | | | Now that Itanium support has been dropped, we can remove the various occurrences of the ELILO on Itanium PE/COFF header workaround. Link: https://bugzilla.tianocore.org/show_bug.cgi?id=816 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Yao Jiewen <jiewen.yao@intel.com> Reviewed-by: Zhang Chao B <chao.b.zhang@intel.com>
* SecurityPkg: HashLib: Change dos formatZhang, Chao B2018-09-106-441/+441
| | | | | | | | | Change file format to DOS Cc: Bi Dandan <dandan.bi@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhang Chao B <chao.b.zhang@intel.com> Reviewed-by: Bi Dandan <dandan.bi@intel.com>
* SecurityPkg/SecureBootConfigDxe: replace OpenFileByDevicePath() with UefiLib APILaszlo Ersek2018-08-162-151/+1
| | | | | | | | | | | | | | | | | | | | | | | Replace the OpenFileByDevicePath() function with EfiOpenFileByDevicePath() from UefiLib, correcting the following issues: - imprecise comments on OpenFileByDevicePath(), - code duplication between this module and other modules, - local variable name "EfiSimpleFileSystemProtocol" starting with "Efi" prefix, - bogus "FileHandle = NULL" assignments, - leaking "Handle1" when the device path type/subtype check or the realignment-motivated AllocateCopyPool() fails in the loop, - stale SHELL_FILE_HANDLE reference in a comment. Cc: Chao Zhang <chao.b.zhang@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Roman Bacik <roman.bacik@broadcom.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1008 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* SecurityPkg/TcgStorageCoreLib.h: Use ascii instead of unicode.Eric Dong2018-08-161-3/+3
| | | | | | | | | | | | | _FILE_ parameter is an ASCII string. Current implementation used as unicode string instead of ascii string. This patch fixed this issue. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1081 Cc: Hao Wu <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed_off_by: Eric Dong <eric.dong@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* SecurityPkg: HashLib: Update HashLib file GUIDZhang, Chao B2018-08-102-2/+2
| | | | | | | | | 2 file GUIDs conflict with existing SHA256 Lib. Update them. Cc: Long Qin <qin.long@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhang, Chao B <chao.b.zhang@intel.com> Reviewed-by: Long, Qin <qin.long@intel.com>
* SecurityPkg/Library/Tpm2DeviceLibDTpm: fix s/Constructor/CONSTRUCTORMarc-André Lureau2018-08-091-1/+1
| | | | | | | | | | | | | | | | | | The library constructor is not being called because of the typo, causing TPM2 detection/initialization to fail. This fixes OVMF TPM2 regression since commit f15cb995bb38. https://bugzilla.tianocore.org/show_bug.cgi?id=1075 Cc: Laszlo Ersek <lersek@redhat.com> Cc: Zhang Chao B <chao.b.zhang@intel.com> Cc: Long Qin <qin.long@intel.com> Fixes: f15cb995bb3880b77e15afe6facd3da05e599a17 Contributed-under: TianoCore Contribution Agreement 1.1 Reported-by: Ricardo Araújo <ricardo@lsd.ufcg.edu.br> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
* SecurityPkg:DSC: Fix 2 DSC build errorZhang, Chao B2018-07-281-2/+2
| | | | | | | | | | Error is caused by SHA384/SHA512 hash lib change in. Cc: Bi Dandan <dandan.bi@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhang, Chao B <chao.b.zhang@intel.com> Reviewed-by: Bi Dandan <dandan.bi@intel.com>
* SecurityPkg: HashLib: Add SHA384, SHA512 HashLibZhang, Chao B2018-07-278-1/+448
| | | | | | | | | | Add SHA384, 512 Hash lib support. Now only CryptoPkg support PEI/DXE version. Cc: Long Qin <qin.long@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhang Chao B <chao.b.zhang@intel.com> Reviewed-by: Long Qin <qin.long@intel.com>
* SecurityPkg/Tcg: Add use case for new Perf macroDandan Bi2018-07-263-0/+10
| | | | | | | | | | | | Add an example case for the usage of PERF_CALLBACK_BEGIN/PERF_CALLBACK_END Cc: Liming Gao <liming.gao@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Chao Zhang<chao.b.zhang@intel.com>
* MdeModulePkg: TpmMeasureLib: Re-prioritize TCG/TCG2 protocolZhang, Chao B2018-07-231-11/+12
| | | | | | | | | | | TPM1.2 is obsoleted by TPM2.0. switch TCG/TCG2 protocol check to apply this trend Cc: Long, Qin <qin.long@intel.com> Cc: Yao, Jiewen <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhang, Chao B <chao.b.zhang@intel.com> Reviewed-by: Yao, Jiewen <jiewen.yao@intel.com>
* SecurityPkg: TcgSmm: Handle invalid parameter in MOR SMI handlerZhang, Chao B2018-07-212-0/+8
| | | | | | | | | | Add more logic to filter invalid function parameter in MOR Control SMI handler Cc: Long Qin <qin.long@intel.com> Cc: Yao Jiewen <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Long Qin <qin.long@intel.com>
* SecurityPkg:Tcg: Fix comment typosZhang, Chao B2018-07-172-16/+16
| | | | | | | | | | "Triggle" is a typo. Replace it with "Trigger" Cc: Long Qin <qin.long@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Long Qin <qin.long@intel.com>
* SecurityPkg: Fix assert when setting key from eMMC/SD/USBRoman Bacik2018-07-121-2/+11
| | | | | | | | | | | | | | | | | | | | | | | When secure boot is enabled, if one loads keys from a FAT formatted eMMC/SD/USB when trying to provision PK/KEK/DB keys via the menu, an assert in StrLen() occurs. This is because the filename starts on odd address, which is not a uint16 aligned boundary: https://bugzilla.tianocore.org/show_bug.cgi?id=1003 There are further known issues with the OpenFileByDevicePath() function; those are tracked by <https://bugzilla.tianocore.org/show_bug.cgi?id=1008>. Cc: Chao Zhang <chao.b.zhang@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Roman Bacik <roman.bacik@broadcom.com> Reviewed-by: "Yao, Jiewen" <jiewen.yao@intel.com> [lersek@redhat.com: whitespace fixes] [lersek@redhat.com: reference TianoCore BZ#1008] Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* SecurityPkg/OpalPassword: Fixed input correct password not works issueEric Dong2018-07-111-0/+9
| | | | | | | | | | | | When user input error password exceed the max allowed times, opal device will return Invalid type error code even user input the correct password. In this case, opal driver needs to force user shutdown the system before let user input new password. Cc: Hao Wu <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* SecurityPkg/TcgStorageOpalLib: Return AUTHORITY_LOCKED_OUT error.Eric Dong2018-07-111-1/+9
| | | | | | | | | | | | Caller need to known this error to handle specially, but current error status not has specified value for this type. In order to keep compatibility, here use TcgResultFailureInvalidType as an replacement. Cc: Hao Wu <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* SecurityPkg: Removing ipf which is no longer supported from edk2.chenc22018-06-2954-5533/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removing rules for Ipf sources file: * Remove the source file which path with "ipf" and also listed in [Sources.IPF] section of INF file. * Remove the source file which listed in [Components.IPF] section of DSC file and not listed in any other [Components] section. * Remove the embedded Ipf code for MDE_CPU_IPF. Removing rules for Inf file: * Remove IPF from VALID_ARCHITECTURES comments. * Remove DXE_SAL_DRIVER from LIBRARY_CLASS in [Defines] section. * Remove the INF which only listed in [Components.IPF] section in DSC. * Remove statements from [BuildOptions] that provide IPF specific flags. * Remove any IPF sepcific sections. Removing rules for Dec file: * Remove [Includes.IPF] section from Dec. Removing rules for Dsc file: * Remove IPF from SUPPORTED_ARCHITECTURES in [Defines] section of DSC. * Remove any IPF specific sections. * Remove statements from [BuildOptions] that provide IPF specific flags. Cc: Chao Zhang <chao.b.zhang@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com>
* SecurityPkg: Clean up source filesLiming Gao2018-06-28224-3243/+3243
| | | | | | | | | 1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com>
* SecurityPkg Tpm2DeviceLibDTpm: Update enum type name to match the one in libLiming Gao2018-06-272-2/+2
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
* SecurityPkg: Tpm2DeviceLib: Enable CapCRBIdleBypass supportZhang, Chao B2018-06-277-14/+146
| | | | | | | | | | | Directly transition from CMD completion to CMD Ready state if device supports IdleByPass Cc: Long Qin <qin.long@intel.com> Cc: Yao Jiewen <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Long Qin <qin.long@intel.com>
* SecurityPkg: Use new added Perf macrosBi, Dandan2018-06-262-16/+16
| | | | | | | | | | Replace old Perf macros with the new added ones. Cc: Liming Gao <liming.gao@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* SecurityPkg: Cache TPM interface type infoZhang, Chao B2018-06-2513-145/+148
| | | | | | | | | | Cache TPM interface type info to avoid excessive interface ID register read Cc: Long Qin <qin.long@intel.com> Cc: Yao Jiewen <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Long Qin <qin.long@intel.com>
* SecurityPkg/SecureBootConfigDxe: Fix invalid NV data issue.Nickle Wang2018-06-151-2/+4
| | | | | | | | | | | Check the return value of HiiGetBrowserData() before calling HiiSetBrowserData(). HiiGetBrowserData() failed to retrieve NV data during action EFI_BROWSER_ACTION_RETRIEVE. If NV data is invalid, stop sending it to form browser. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Nickle Wang <nickle.wang@hpe.com> Signed-off-by: cinnamon shia <cinnamon.shia@hpe.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
* SecurityPkg/Tcg2Smm: Correct function parameter attributeZhang, Chao B2018-05-291-4/+4
| | | | | | | | | | | | Correct UpdatePossibleResource parameter attribute to align to comment Change-Id: Id8f8be975f0e8666573decc3fbaaf326b7767ba8 Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Long Qin <qin.long@intel.com> Cc: Yao Jiewen <jiewen.yao@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> Signed-off-by: Zhang, Chao B <chao.b.zhang@intel.com> Reviewed-by: Long Qin <qin.long@intel.com>
* SecurityPkg/TcgStorage*Lib.h: Fix ECC reported issues.Eric Dong2018-05-243-8/+8
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com>
* SecurityPkg:Tcg2Smm: Update TcgNvs info after memory is allocatedZhang, Chao B2018-05-221-7/+12
| | | | | | | | | | | Update package format info in _PRS to TcgNvs after memory is allocated. Change-Id: Icfadb350e60d3ed2df332e92c257ce13309c0018 Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yao Jiewen <jiewen.yao@intel.com> Cc: Long Qin <qin.long@intel.com> Signed-off-by: Zhang, Chao B <chao.b.zhang@intel.com> Reviewed-by: Long Qin <qin.long@intel.com>
* SecurityPkg/TcgSTorage*Lib.h: Add referenced spec information.Eric Dong2018-05-172-2/+27
| | | | | | | | | Add link and version info for the referenced spec. Cc: Jiewen yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* SecurityPkg/OpalPassword: Fix PSID revert no hint message.Eric Dong2018-05-151-9/+20
| | | | | | | | | | | | | | For no warning message when do the PSID revert action, the message in the popup dialog is not enough. The error use of NULL for CreatePopUp function caused this regression. This change fixed it. Passed Unit Test: 1. Check PSID revert with/without warning message cases. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* SecurityPkg/TcgStorageOpalLib: Fix GCC build failure.Eric Dong2018-05-152-5/+0
| | | | | | | | | | | | | Function definition different with function implementation caused this build failure. Change code to make them consistent to pass the build. Done Unit Test: 1. Pass GCC build. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* SecurityPkg/OpalPassword: Add support for pyrite 2.0 devices.Eric Dong2018-05-074-8/+148
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* SecurityPkg/TcgStorageOpalLib: Add supports for pyrite 2.0 spec.Eric Dong2018-05-075-49/+731
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* SecurityPkg/UserProfileManagerDxe: Update RouteConfig functionThomas Palmer2018-05-031-0/+3
| | | | | | | | | | | According to UEFI spec, the RouteConfig protocol function should populate the Progress pointer with an address inside Configuration. This patch ensures that these functions are compliant when EFI_NOT_FOUND is returned. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* SecurityPkg/UserIdentifyManagerDxe: Update RouteConfig functionThomas Palmer2018-05-031-0/+3
| | | | | | | | | | | According to UEFI spec, the RouteConfig protocol function should populate the Progress pointer with an address inside Configuration. This patch ensures that these functions are compliant when EFI_NOT_FOUND is returned. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* SecurityPkg/PwdCredentialProviderDxe: Update RouteConfig functionThomas Palmer2018-05-031-0/+3
| | | | | | | | | | | According to UEFI spec, the RouteConfig protocol function should populate the Progress pointer with an address inside Configuration. This patch ensures that these functions are compliant when EFI_NOT_FOUND is returned. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* SecurityPkg/Tcg2Config: Update RouteConfig functionThomas Palmer2018-05-031-0/+3
| | | | | | | | | | | According to UEFI spec, the RouteConfig protocol function should populate the Progress pointer with an address inside Configuration. This patch ensures that these functions are compliant when EFI_NOT_FOUND is returned. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* SecurityPkg FmpAuthenticationLibRsa2048Sha256: Remove PCD referenceStar Zeng2018-04-202-6/+3
| | | | | | | | | | | | | | | | | | PcdRsa2048Sha256PublicKeyBuffer is referenced but not used in the library, that makes me a little confusing. Actually, the PublicKeyData should be from the caller of AuthenticateFmpImage() as input parameter, for example EdkiiSystemCapsuleLib. This patch is to remove the PCD reference in this library instance to be aligned with FmpAuthenticationLibPkcs7 that does not reference PcdPkcs7CertBuffer. Cc: Chao Zhang <chao.b.zhang@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* SecurityPkg Tpm12CommandLib: Fix TPM12 GetCapability response errorZhang, Chao B2018-03-211-3/+3
| | | | | | | | | | | | TPM12 command lib doesn't convert Response Size before using. Add logic to fix the issue. Cc: Long Qin <qin.long@intel.com> Cc: Yao Jiewen <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Long Qin <qin.long@intel.com> Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
* SecurityPkg Tpm2CommandLib: Fix TPM2.0 response memory overflowZhang, Chao B2018-03-218-10/+151
| | | | | | | | | | | | | TPM2.0 command lib always assumes TPM device and transmission channel can respond correctly. But it is not true when communication channel is exploited and wrong data is spoofed. Add more logic to prohibit memory overflow attack. Cc: Long Qin <qin.long@intel.com> Cc: Yao Jiewen <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Long Qin <qin.long@intel.com> Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
* SecurityPkg OpalPasswordDxe:Fix wrong BufferSize input to UnicodeSPrintStar Zeng2018-03-171-11/+8
| | | | | | | | | | | | | | | | | Current code uses string length as BufferSize input to UnicodeSPrint, it is wrong and makes the pop up string trimmed. The BufferSize input to UnicodeSPrint should be the size, in bytes, of the output buffer. This is to use sizeof (mPopUpString) as the BufferSize input to UnicodeSPrint, it also updates array size of mPopUpString from 256 to 100 that is enough, otherwise the pop up string may be too long. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* SecurityPkg OpalPasswordPei: Go next when AhciModeInitialize is failedStar Zeng2018-03-171-10/+9
| | | | | | | | | | | | | | Go to next loop instead of going to unlock OPAL password when AhciModeInitialize is failed. It is just error handling. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* SecurityPkg OpalPasswordDxe: Move OPAL request variable definitionStar Zeng2018-03-172-8/+8
| | | | | | | | | | | | Move OPAL request variable definition from OpalHiiFormValues.h to OpalHii.h. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* SecurityPkg OpalPasswordDxe: Return directly if no any deviceStar Zeng2018-03-171-0/+8
| | | | | | | | | | | Return directly if no any device in EndOfDxe notification. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* SecurityPkg/dec: remove TrEE.Jiewen Yao2018-03-161-17/+1
| | | | | | | | | TrEE is deprecated. We need use Tcg2. Cc: Chao B Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com>
* SecurityPkg/include: remove TrEE.Jiewen Yao2018-03-164-313/+0
| | | | | | | | | TrEE is deprecated. We need use Tcg2. Cc: Chao B Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com>
* SecurityPkg/TrEEVendorLib: remove TrEE.Jiewen Yao2018-03-163-186/+0
| | | | | | | | | TrEE is deprecated. We need use Tcg2. Cc: Chao B Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com>
* SecurityPkg/TrEEPhysicalPresenceLib: remove TrEE.Jiewen Yao2018-03-164-868/+0
| | | | | | | | | TrEE is deprecated. We need use Tcg2. Cc: Chao B Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com>