CryptoPkg/Library: Add BaseCryptLibOnProtocolPpi instances

https://bugzilla.tianocore.org/show_bug.cgi?id=2420

Based on the following package with changes to merge into
CryptoPkg.

https://github.com/microsoft/mu_plus/tree/dev/201908/SharedCryptoPkg

Add the PeiCryptLib, DxeCryptLib, and SmmCryptLib instances
of the BaseCryptLib library classes that are implemented using
the services of EDK II Crypto Protocols/PPIs.

These library instances all set a dependency expression on the
EDK II Crypto Protocols/PPIs, so any modules that use these
library instances are not dispatched until the modules that
produce the EDK II Crypto Protocols/PPIs are dispatched.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
This commit is contained in:
Michael D Kinney
2019-11-21 09:24:53 -08:00
committed by mergify[bot]
parent cc1d13c922
commit cd70de1cc0
8 changed files with 4741 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
## @file
# Implements the BaseCryptLib and TlsLib using the services of the EDK II Crypto
# PPI.
#
# Copyright (C) Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
[Defines]
INF_VERSION = 0x0001001B
BASE_NAME = PeiCryptLib
MODULE_UNI_FILE = CryptLib.uni
FILE_GUID = 3E8B50C6-F68C-4212-B903-94A10FE02399
VERSION_STRING = 1.0
MODULE_TYPE = PEIM
LIBRARY_CLASS = BaseCryptLib | PEIM
LIBRARY_CLASS = TlsLib | PEIM
#
# The following information is for reference only and not required by the build tools.
#
# VALID_ARCHITECTURES = IA32 X64 ARM AARCH64
#
[Packages]
MdePkg/MdePkg.dec
CryptoPkg/CryptoPkg.dec
[LibraryClasses]
BaseLib
DebugLib
PeiServicesLib
[Sources]
PeiCryptLib.c
CryptLib.c
[Ppis]
gEdkiiCryptoPpiGuid ## CONSUMES
[Depex]
gEdkiiCryptoPpiGuid