CryptoPkg: Make EC source file config-able

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3679
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3828

Use PCD gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled to config-able
source files list in OpensslLib.inf and OpensslLibCrypto.inf.
If PcdEcEnabled equals to FALSE, this file will not be compiled.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Signed-off-by: yi1 li <yi1.li@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
yi1 li
2022-04-13 15:02:02 +08:00
committed by mergify[bot]
parent efc39e65e5
commit 0c901fcc20
4 changed files with 108 additions and 93 deletions

View File

@@ -9,7 +9,7 @@
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#include <Library/PcdLib.h>
#include <openssl/opensslv.h>
#ifdef __cplusplus
@@ -55,6 +55,11 @@ extern "C" {
#ifndef OPENSSL_NO_DSA
#define OPENSSL_NO_DSA
#endif
#if !FixedPcdGetBool (PcdEcEnabled)
#ifndef OPENSSL_NO_EC
#define OPENSSL_NO_EC
#endif
#endif
#ifndef OPENSSL_NO_IDEA
#define OPENSSL_NO_IDEA
#endif