public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH V2 0/5] CryptoPkg/openssl: Enable EC conditionally.
@ 2022-05-10  4:40 yi1 li
  2022-05-10  4:40 ` [PATCH V2 1/5] CryptoPkg: Rename PCD about openssl EC configuration yi1 li
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: yi1 li @ 2022-05-10  4:40 UTC (permalink / raw)
  To: devel
  Cc: Yi Li, Jiewen Yao, Jian J Wang, Xiaoyu Lu, Guomin Jiang,
	Gerd Hoffmann

Recommend from Gerd:
(2) Keep the EC config option, but update process_files.pl to
  automatically add the PcdEcEnabled config option handling
  to the files it generates.

This patch set does (2).

When remove 'no-ec' from openssl configure list, will automatically remove
'OPENSSL_NO_EC', 'OPENSSL_NO_ECDH', 'OPENSSL_NO_ECDSA', 'OPENSSL_NO_TLS1_3',
'OPENSSL_NO_SM2' from header, and add '/ec/.', '/sm2/.' files to INF files.

Signed-off-by: Yi Li <yi1.li@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>

Yi Li (5):
  CryptoPkg: Rename PCD about openssl EC configuration
  CryptoPkg: Separate auto-generated openssl config and edk2 openssl
    config
  CryptoPkg: Update process_files.pl to automatically add PCD config
    option
  CryptoPkg/openssl: update generated files
  CryptoPkg/openssl: disable codestyle checks for generated files

 CryptoPkg/CryptoPkg.ci.yaml                   |  11 +
 CryptoPkg/CryptoPkg.dec                       |   2 +-
 .../Library/BaseCryptLib/BaseCryptLib.inf     |   2 +-
 .../Library/BaseCryptLib/PeiCryptLib.inf      |   2 +-
 .../Library/BaseCryptLib/RuntimeCryptLib.inf  |   2 +-
 .../Library/BaseCryptLib/SmmCryptLib.inf      |   2 +-
 .../BaseCryptLib/UnitTestHostBaseCryptLib.inf |   2 +-
 CryptoPkg/Library/Include/crypto/dso_conf.h   |   7 +-
 .../Library/Include/openssl/opensslconf.h     | 348 +-----------------
 .../Include/openssl/opensslconf_generated.h   | 333 +++++++++++++++++
 CryptoPkg/Library/OpensslLib/OpensslLib.inf   |  98 ++---
 .../Library/OpensslLib/OpensslLibCrypto.inf   |  98 ++---
 CryptoPkg/Library/OpensslLib/process_files.pl |  77 +++-
 CryptoPkg/Library/TlsLib/TlsLib.inf           |   2 +-
 14 files changed, 550 insertions(+), 436 deletions(-)
 create mode 100644 CryptoPkg/Library/Include/openssl/opensslconf_generated.h

-- 
2.31.1.windows.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH V2 1/5] CryptoPkg: Rename PCD about openssl EC configuration
  2022-05-10  4:40 [PATCH V2 0/5] CryptoPkg/openssl: Enable EC conditionally yi1 li
@ 2022-05-10  4:40 ` yi1 li
  2022-05-10  4:40 ` [PATCH V2 2/5] CryptoPkg: Separate auto-generated openssl config and edk2 openssl config yi1 li
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: yi1 li @ 2022-05-10  4:40 UTC (permalink / raw)
  To: devel; +Cc: Yi Li, Jiewen Yao, Jian J Wang, Xiaoyu Lu, Guomin Jiang

PcdOpensslXXXEnabled is a more appropriate choice.

Signed-off-by: Yi Li <yi1.li@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
---
 CryptoPkg/CryptoPkg.dec                       |  2 +-
 .../Library/BaseCryptLib/BaseCryptLib.inf     |  2 +-
 .../Library/BaseCryptLib/PeiCryptLib.inf      |  2 +-
 .../Library/BaseCryptLib/RuntimeCryptLib.inf  |  2 +-
 .../Library/BaseCryptLib/SmmCryptLib.inf      |  2 +-
 .../BaseCryptLib/UnitTestHostBaseCryptLib.inf |  2 +-
 .../Library/Include/openssl/opensslconf.h     |  2 +-
 CryptoPkg/Library/OpensslLib/OpensslLib.inf   | 94 +++++++++----------
 .../Library/OpensslLib/OpensslLibCrypto.inf   | 94 +++++++++----------
 CryptoPkg/Library/TlsLib/TlsLib.inf           |  2 +-
 10 files changed, 102 insertions(+), 102 deletions(-)

diff --git a/CryptoPkg/CryptoPkg.dec b/CryptoPkg/CryptoPkg.dec
index ebec64050b71..d9b64e5763ce 100644
--- a/CryptoPkg/CryptoPkg.dec
+++ b/CryptoPkg/CryptoPkg.dec
@@ -83,7 +83,7 @@
 
   ## Enable/Disable the ECC feature in openssl library. The default is disabled.
   #  If ECC feature is disabled, all related source files will not be compiled.
-  gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled|FALSE|BOOLEAN|0x0000003
+  gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled|FALSE|BOOLEAN|0x0000003
 
 [UserExtensions.TianoCore."ExtraFiles"]
   CryptoPkgExtra.uni
diff --git a/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf b/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
index 5bbdb387d6ba..59e21a5b48f8 100644
--- a/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
+++ b/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
@@ -89,7 +89,7 @@
   PrintLib
 
 [FixedPcd]
-  gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
+  gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
 
 #
 # Remove these [BuildOptions] after this library is cleaned up
diff --git a/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf b/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
index fd500e61ec99..2ea1fbfcd728 100644
--- a/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
+++ b/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
@@ -78,7 +78,7 @@
   IntrinsicLib
 
 [FixedPcd]
-  gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
+  gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
 
 #
 # Remove these [BuildOptions] after this library is cleaned up
diff --git a/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf b/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
index 3e4524896c45..69656fd28bdd 100644
--- a/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
+++ b/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
@@ -94,7 +94,7 @@
   PrintLib
 
 [FixedPcd]
-  gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
+  gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
 
 #
 # Remove these [BuildOptions] after this library is cleaned up
diff --git a/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf b/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
index ae75bc87b5e5..91a171509540 100644
--- a/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
+++ b/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
@@ -93,7 +93,7 @@
   SynchronizationLib
 
 [FixedPcd]
-  gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
+  gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
 
 #
 # Remove these [BuildOptions] after this library is cleaned up
diff --git a/CryptoPkg/Library/BaseCryptLib/UnitTestHostBaseCryptLib.inf b/CryptoPkg/Library/BaseCryptLib/UnitTestHostBaseCryptLib.inf
index 44c183b90563..17062ce84e15 100644
--- a/CryptoPkg/Library/BaseCryptLib/UnitTestHostBaseCryptLib.inf
+++ b/CryptoPkg/Library/BaseCryptLib/UnitTestHostBaseCryptLib.inf
@@ -73,7 +73,7 @@
   OpensslLib
 
 [FixedPcd]
-  gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
+  gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
 
 #
 # Remove these [BuildOptions] after this library is cleaned up
diff --git a/CryptoPkg/Library/Include/openssl/opensslconf.h b/CryptoPkg/Library/Include/openssl/opensslconf.h
index 1485b8c9f108..22a7216cc46c 100644
--- a/CryptoPkg/Library/Include/openssl/opensslconf.h
+++ b/CryptoPkg/Library/Include/openssl/opensslconf.h
@@ -55,7 +55,7 @@ extern "C" {
 #ifndef OPENSSL_NO_DSA
 #define OPENSSL_NO_DSA
 #endif
-#if !FixedPcdGetBool (PcdEcEnabled)
+#if !FixedPcdGetBool (PcdOpensslEcEnabled)
   #ifndef OPENSSL_NO_EC
 #define OPENSSL_NO_EC
   #endif
diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.inf b/CryptoPkg/Library/OpensslLib/OpensslLib.inf
index a97b3f5e8ff2..a92eefcc9466 100644
--- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf
+++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf
@@ -199,43 +199,43 @@
   $(OPENSSL_PATH)/crypto/dso/dso_vms.c
   $(OPENSSL_PATH)/crypto/dso/dso_win32.c
   $(OPENSSL_PATH)/crypto/ebcdic.c
-  $(OPENSSL_PATH)/crypto/ec/curve25519.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/arch_32/f_impl.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/curve448.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/curve448_tables.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/eddsa.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/f_generic.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/scalar.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec2_oct.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec2_smpl.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_ameth.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_asn1.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_check.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_curve.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_cvt.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_err.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_key.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_kmeth.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_lib.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_mult.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_oct.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_pmeth.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_print.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecdh_kdf.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecdh_ossl.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecdsa_ossl.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecdsa_sign.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecdsa_vrf.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/eck_prn.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecp_mont.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecp_nist.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecp_nistp224.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecp_nistp256.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecp_nistp521.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecp_nistputil.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecp_oct.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecp_smpl.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecx_meth.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve25519.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/arch_32/f_impl.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/curve448.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/curve448_tables.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/eddsa.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/f_generic.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/scalar.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec2_oct.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec2_smpl.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_ameth.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_asn1.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_check.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_curve.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_cvt.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_err.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_key.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_kmeth.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_lib.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_mult.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_oct.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_pmeth.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_print.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecdh_kdf.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecdh_ossl.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecdsa_ossl.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecdsa_sign.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecdsa_vrf.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/eck_prn.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecp_mont.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecp_nist.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecp_nistp224.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecp_nistp256.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecp_nistp521.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecp_nistputil.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecp_oct.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecp_smpl.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecx_meth.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/err/err.c
   $(OPENSSL_PATH)/crypto/err/err_prn.c
   $(OPENSSL_PATH)/crypto/evp/bio_b64.c
@@ -533,15 +533,15 @@
   $(OPENSSL_PATH)/crypto/conf/conf_local.h
   $(OPENSSL_PATH)/crypto/dh/dh_local.h
   $(OPENSSL_PATH)/crypto/dso/dso_local.h
-  $(OPENSSL_PATH)/crypto/ec/ec_local.h      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/curve448_local.h     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/curve448utils.h      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/ed448.h      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/field.h      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/point_448.h      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/word.h     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/arch_32/arch_intrinsics.h      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/arch_32/f_impl.h     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_local.h      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/curve448_local.h     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/curve448utils.h      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/ed448.h      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/field.h      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/point_448.h      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/word.h     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/arch_32/arch_intrinsics.h      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/arch_32/f_impl.h     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/evp/evp_local.h
   $(OPENSSL_PATH)/crypto/hmac/hmac_local.h
   $(OPENSSL_PATH)/crypto/lhash/lhash_local.h
@@ -634,7 +634,7 @@
   ArmSoftFloatLib
 
 [FixedPcd]
-  gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled      ## CONSUMES
+  gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled      ## CONSUMES
 
 [BuildOptions]
   #
diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
index 490b83602be9..63f550f626db 100644
--- a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
+++ b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
@@ -199,43 +199,43 @@
   $(OPENSSL_PATH)/crypto/dso/dso_vms.c
   $(OPENSSL_PATH)/crypto/dso/dso_win32.c
   $(OPENSSL_PATH)/crypto/ebcdic.c
-  $(OPENSSL_PATH)/crypto/ec/curve25519.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/arch_32/f_impl.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/curve448.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/curve448_tables.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/eddsa.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/f_generic.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/scalar.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec2_oct.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec2_smpl.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_ameth.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_asn1.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_check.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_curve.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_cvt.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_err.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_key.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_kmeth.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_lib.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_mult.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_oct.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_pmeth.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_print.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecdh_kdf.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecdh_ossl.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecdsa_ossl.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecdsa_sign.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecdsa_vrf.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/eck_prn.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecp_mont.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecp_nist.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecp_nistp224.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecp_nistp256.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecp_nistp521.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecp_nistputil.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecp_oct.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecp_smpl.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecx_meth.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve25519.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/arch_32/f_impl.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/curve448.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/curve448_tables.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/eddsa.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/f_generic.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/scalar.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec2_oct.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec2_smpl.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_ameth.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_asn1.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_check.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_curve.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_cvt.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_err.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_key.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_kmeth.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_lib.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_mult.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_oct.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_pmeth.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_print.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecdh_kdf.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecdh_ossl.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecdsa_ossl.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecdsa_sign.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecdsa_vrf.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/eck_prn.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecp_mont.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecp_nist.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecp_nistp224.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecp_nistp256.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecp_nistp521.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecp_nistputil.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecp_oct.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecp_smpl.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecx_meth.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/err/err.c
   $(OPENSSL_PATH)/crypto/err/err_prn.c
   $(OPENSSL_PATH)/crypto/evp/bio_b64.c
@@ -533,15 +533,15 @@
   $(OPENSSL_PATH)/crypto/conf/conf_local.h
   $(OPENSSL_PATH)/crypto/dh/dh_local.h
   $(OPENSSL_PATH)/crypto/dso/dso_local.h
-  $(OPENSSL_PATH)/crypto/ec/ec_local.h    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/curve448_local.h   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/curve448utils.h    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/ed448.h    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/field.h    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/point_448.h    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/word.h   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/arch_32/arch_intrinsics.h    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/arch_32/f_impl.h   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_local.h    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/curve448_local.h   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/curve448utils.h    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/ed448.h    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/field.h    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/point_448.h    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/word.h   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/arch_32/arch_intrinsics.h    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/arch_32/f_impl.h   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/evp/evp_local.h
   $(OPENSSL_PATH)/crypto/hmac/hmac_local.h
   $(OPENSSL_PATH)/crypto/lhash/lhash_local.h
@@ -583,7 +583,7 @@
   ArmSoftFloatLib
 
 [FixedPcd]
-  gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled      ## CONSUMES
+  gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled      ## CONSUMES
 
 [BuildOptions]
   #
diff --git a/CryptoPkg/Library/TlsLib/TlsLib.inf b/CryptoPkg/Library/TlsLib/TlsLib.inf
index 001e13e3990b..bc61cda74556 100644
--- a/CryptoPkg/Library/TlsLib/TlsLib.inf
+++ b/CryptoPkg/Library/TlsLib/TlsLib.inf
@@ -42,7 +42,7 @@
   SafeIntLib
 
 [FixedPcd]
-  gEfiCryptoPkgTokenSpaceGuid.PcdEcEnabled
+  gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
 
 [BuildOptions]
   #
-- 
2.31.1.windows.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH V2 2/5] CryptoPkg: Separate auto-generated openssl config and edk2 openssl config
  2022-05-10  4:40 [PATCH V2 0/5] CryptoPkg/openssl: Enable EC conditionally yi1 li
  2022-05-10  4:40 ` [PATCH V2 1/5] CryptoPkg: Rename PCD about openssl EC configuration yi1 li
@ 2022-05-10  4:40 ` yi1 li
  2022-05-10 10:49   ` Gerd Hoffmann
  2022-05-10  4:40 ` [PATCH V2 3/5] CryptoPkg: Update process_files.pl to automatically add PCD config option yi1 li
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: yi1 li @ 2022-05-10  4:40 UTC (permalink / raw)
  To: devel
  Cc: Yi Li, Jiewen Yao, Jian J Wang, Xiaoyu Lu, Guomin Jiang,
	Gerd Hoffmann

Move auto-generated openssl config to opensslconf_generated.h,
 And opensslconf.h will contain both edk2 conditional openssl
 feature and opensslconf_generated.h.
Will make two part more clear.
New conditional feture code in opensslconf.h will look like:

/* Autogenerated conditional openssl feature list starts here */
[.....]
/* Autogenerated conditional openssl feature list ends here */

Signed-off-by: Yi Li <yi1.li@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
---
 .../Library/Include/openssl/opensslconf.h     | 331 +----------------
 .../Include/openssl/opensslconf_generated.h   | 349 ++++++++++++++++++
 2 files changed, 352 insertions(+), 328 deletions(-)
 create mode 100644 CryptoPkg/Library/Include/openssl/opensslconf_generated.h

diff --git a/CryptoPkg/Library/Include/openssl/opensslconf.h b/CryptoPkg/Library/Include/openssl/opensslconf.h
index 22a7216cc46c..98962e0fe378 100644
--- a/CryptoPkg/Library/Include/openssl/opensslconf.h
+++ b/CryptoPkg/Library/Include/openssl/opensslconf.h
@@ -10,339 +10,14 @@
  * https://www.openssl.org/source/license.html
  */
 #include <Library/PcdLib.h>
-#include <openssl/opensslv.h>
+#include <openssl/opensslconf_generated.h>
 
 #ifdef  __cplusplus
 extern "C" {
 #endif
 
-#ifdef OPENSSL_ALGORITHM_DEFINES
-  #error OPENSSL_ALGORITHM_DEFINES no longer supported
-#endif
-
-/*
- * OpenSSL was configured with the following options:
- */
-
-#ifndef OPENSSL_SYS_UEFI
-#define OPENSSL_SYS_UEFI  1
-#endif
-#define OPENSSL_MIN_API  0x10100000L
-#ifndef OPENSSL_NO_BF
-#define OPENSSL_NO_BF
-#endif
-#ifndef OPENSSL_NO_BLAKE2
-#define OPENSSL_NO_BLAKE2
-#endif
-#ifndef OPENSSL_NO_CAMELLIA
-#define OPENSSL_NO_CAMELLIA
-#endif
-#ifndef OPENSSL_NO_CAST
-#define OPENSSL_NO_CAST
-#endif
-#ifndef OPENSSL_NO_CHACHA
-#define OPENSSL_NO_CHACHA
-#endif
-#ifndef OPENSSL_NO_CMS
-#define OPENSSL_NO_CMS
-#endif
-#ifndef OPENSSL_NO_CT
-#define OPENSSL_NO_CT
-#endif
-#ifndef OPENSSL_NO_DES
-#define OPENSSL_NO_DES
-#endif
-#ifndef OPENSSL_NO_DSA
-#define OPENSSL_NO_DSA
-#endif
-#if !FixedPcdGetBool (PcdOpensslEcEnabled)
-  #ifndef OPENSSL_NO_EC
-#define OPENSSL_NO_EC
-  #endif
-#endif
-#ifndef OPENSSL_NO_IDEA
-#define OPENSSL_NO_IDEA
-#endif
-#ifndef OPENSSL_NO_MD2
-#define OPENSSL_NO_MD2
-#endif
-#ifndef OPENSSL_NO_MD4
-#define OPENSSL_NO_MD4
-#endif
-#ifndef OPENSSL_NO_MDC2
-#define OPENSSL_NO_MDC2
-#endif
-#ifndef OPENSSL_NO_POLY1305
-#define OPENSSL_NO_POLY1305
-#endif
-#ifndef OPENSSL_NO_RC2
-#define OPENSSL_NO_RC2
-#endif
-#ifndef OPENSSL_NO_RC4
-#define OPENSSL_NO_RC4
-#endif
-#ifndef OPENSSL_NO_RC5
-#define OPENSSL_NO_RC5
-#endif
-#ifndef OPENSSL_NO_RMD160
-#define OPENSSL_NO_RMD160
-#endif
-#ifndef OPENSSL_NO_SEED
-#define OPENSSL_NO_SEED
-#endif
-#ifndef OPENSSL_NO_SM2
-#define OPENSSL_NO_SM2
-#endif
-#ifndef OPENSSL_NO_SRP
-#define OPENSSL_NO_SRP
-#endif
-#ifndef OPENSSL_NO_TS
-#define OPENSSL_NO_TS
-#endif
-#ifndef OPENSSL_NO_WHIRLPOOL
-#define OPENSSL_NO_WHIRLPOOL
-#endif
-#ifndef OPENSSL_RAND_SEED_NONE
-#define OPENSSL_RAND_SEED_NONE
-#endif
-#ifndef OPENSSL_NO_AFALGENG
-#define OPENSSL_NO_AFALGENG
-#endif
-#ifndef OPENSSL_NO_APPS
-#define OPENSSL_NO_APPS
-#endif
-#ifndef OPENSSL_NO_ASAN
-#define OPENSSL_NO_ASAN
-#endif
-#ifndef OPENSSL_NO_ASYNC
-#define OPENSSL_NO_ASYNC
-#endif
-#ifndef OPENSSL_NO_AUTOERRINIT
-#define OPENSSL_NO_AUTOERRINIT
-#endif
-#ifndef OPENSSL_NO_AUTOLOAD_CONFIG
-#define OPENSSL_NO_AUTOLOAD_CONFIG
-#endif
-#ifndef OPENSSL_NO_CAPIENG
-#define OPENSSL_NO_CAPIENG
-#endif
-#ifndef OPENSSL_NO_CRYPTO_MDEBUG
-#define OPENSSL_NO_CRYPTO_MDEBUG
-#endif
-#ifndef OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
-#define OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
-#endif
-#ifndef OPENSSL_NO_DEPRECATED
-#define OPENSSL_NO_DEPRECATED
-#endif
-#ifndef OPENSSL_NO_DEVCRYPTOENG
-#define OPENSSL_NO_DEVCRYPTOENG
-#endif
-#ifndef OPENSSL_NO_DGRAM
-#define OPENSSL_NO_DGRAM
-#endif
-#ifndef OPENSSL_NO_DTLS
-#define OPENSSL_NO_DTLS
-#endif
-#ifndef OPENSSL_NO_DTLS1
-#define OPENSSL_NO_DTLS1
-#endif
-#ifndef OPENSSL_NO_DTLS1_2
-#define OPENSSL_NO_DTLS1_2
-#endif
-#ifndef OPENSSL_NO_EC2M
-#define OPENSSL_NO_EC2M
-#endif
-#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
-#define OPENSSL_NO_EC_NISTP_64_GCC_128
-#endif
-#ifndef OPENSSL_NO_ECDH
-#define OPENSSL_NO_ECDH
-#endif
-#ifndef OPENSSL_NO_ECDSA
-#define OPENSSL_NO_ECDSA
-#endif
-#ifndef OPENSSL_NO_EGD
-#define OPENSSL_NO_EGD
-#endif
-#ifndef OPENSSL_NO_ENGINE
-#define OPENSSL_NO_ENGINE
-#endif
-#ifndef OPENSSL_NO_ERR
-#define OPENSSL_NO_ERR
-#endif
-#ifndef OPENSSL_NO_EXTERNAL_TESTS
-#define OPENSSL_NO_EXTERNAL_TESTS
-#endif
-#ifndef OPENSSL_NO_FILENAMES
-#define OPENSSL_NO_FILENAMES
-#endif
-#ifndef OPENSSL_NO_FUZZ_AFL
-#define OPENSSL_NO_FUZZ_AFL
-#endif
-#ifndef OPENSSL_NO_FUZZ_LIBFUZZER
-#define OPENSSL_NO_FUZZ_LIBFUZZER
-#endif
-#ifndef OPENSSL_NO_GOST
-#define OPENSSL_NO_GOST
-#endif
-#ifndef OPENSSL_NO_HEARTBEATS
-#define OPENSSL_NO_HEARTBEATS
-#endif
-#ifndef OPENSSL_NO_HW
-#define OPENSSL_NO_HW
-#endif
-#ifndef OPENSSL_NO_MSAN
-#define OPENSSL_NO_MSAN
-#endif
-#ifndef OPENSSL_NO_OCB
-#define OPENSSL_NO_OCB
-#endif
-#ifndef OPENSSL_NO_POSIX_IO
-#define OPENSSL_NO_POSIX_IO
-#endif
-#ifndef OPENSSL_NO_RFC3779
-#define OPENSSL_NO_RFC3779
-#endif
-#ifndef OPENSSL_NO_SCRYPT
-#define OPENSSL_NO_SCRYPT
-#endif
-#ifndef OPENSSL_NO_SCTP
-#define OPENSSL_NO_SCTP
-#endif
-#ifndef OPENSSL_NO_SOCK
-#define OPENSSL_NO_SOCK
-#endif
-#ifndef OPENSSL_NO_SSL_TRACE
-#define OPENSSL_NO_SSL_TRACE
-#endif
-#ifndef OPENSSL_NO_SSL3
-#define OPENSSL_NO_SSL3
-#endif
-#ifndef OPENSSL_NO_SSL3_METHOD
-#define OPENSSL_NO_SSL3_METHOD
-#endif
-#ifndef OPENSSL_NO_STDIO
-#define OPENSSL_NO_STDIO
-#endif
-#ifndef OPENSSL_NO_TESTS
-#define OPENSSL_NO_TESTS
-#endif
-#ifndef OPENSSL_NO_TLS1_3
-#define OPENSSL_NO_TLS1_3
-#endif
-#ifndef OPENSSL_NO_UBSAN
-#define OPENSSL_NO_UBSAN
-#endif
-#ifndef OPENSSL_NO_UI_CONSOLE
-#define OPENSSL_NO_UI_CONSOLE
-#endif
-#ifndef OPENSSL_NO_UNIT_TEST
-#define OPENSSL_NO_UNIT_TEST
-#endif
-#ifndef OPENSSL_NO_WEAK_SSL_CIPHERS
-#define OPENSSL_NO_WEAK_SSL_CIPHERS
-#endif
-#ifndef OPENSSL_NO_DYNAMIC_ENGINE
-#define OPENSSL_NO_DYNAMIC_ENGINE
-#endif
-
-/*
- * Sometimes OPENSSSL_NO_xxx ends up with an empty file and some compilers
- * don't like that.  This will hopefully silence them.
- */
-#define NON_EMPTY_TRANSLATION_UNIT  static void *dummy = &dummy;
-
-/*
- * Applications should use -DOPENSSL_API_COMPAT=<version> to suppress the
- * declarations of functions deprecated in or before <version>. Otherwise, they
- * still won't see them if the library has been built to disable deprecated
- * functions.
- */
-#ifndef DECLARE_DEPRECATED
-#define DECLARE_DEPRECATED(f)  f;
-  #ifdef __GNUC__
-    #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0)
-      #undef DECLARE_DEPRECATED
-#define DECLARE_DEPRECATED(f)  f __attribute__ ((deprecated));
-    #endif
-  #elif defined (__SUNPRO_C)
-    #if (__SUNPRO_C >= 0x5130)
-      #undef DECLARE_DEPRECATED
-#define DECLARE_DEPRECATED(f)  f __attribute__ ((deprecated));
-    #endif
-  #endif
-#endif
-
-#ifndef OPENSSL_FILE
-  #ifdef OPENSSL_NO_FILENAMES
-#define OPENSSL_FILE  ""
-#define OPENSSL_LINE  0
-  #else
-#define OPENSSL_FILE  __FILE__
-#define OPENSSL_LINE  __LINE__
-  #endif
-#endif
-
-#ifndef OPENSSL_MIN_API
-#define OPENSSL_MIN_API  0
-#endif
-
-#if !defined (OPENSSL_API_COMPAT) || OPENSSL_API_COMPAT < OPENSSL_MIN_API
-  #undef OPENSSL_API_COMPAT
-#define OPENSSL_API_COMPAT  OPENSSL_MIN_API
-#endif
-
-/*
- * Do not deprecate things to be deprecated in version 1.2.0 before the
- * OpenSSL version number matches.
- */
-#if OPENSSL_VERSION_NUMBER < 0x10200000L
-#define DEPRECATEDIN_1_2_0(f)  f;
-#elif OPENSSL_API_COMPAT < 0x10200000L
-#define DEPRECATEDIN_1_2_0(f)  DECLARE_DEPRECATED(f)
-#else
-#define DEPRECATEDIN_1_2_0(f)
-#endif
-
-#if OPENSSL_API_COMPAT < 0x10100000L
-#define DEPRECATEDIN_1_1_0(f)  DECLARE_DEPRECATED(f)
-#else
-#define DEPRECATEDIN_1_1_0(f)
-#endif
-
-#if OPENSSL_API_COMPAT < 0x10000000L
-#define DEPRECATEDIN_1_0_0(f)  DECLARE_DEPRECATED(f)
-#else
-#define DEPRECATEDIN_1_0_0(f)
-#endif
-
-#if OPENSSL_API_COMPAT < 0x00908000L
-#define DEPRECATEDIN_0_9_8(f)  DECLARE_DEPRECATED(f)
-#else
-#define DEPRECATEDIN_0_9_8(f)
-#endif
-
-/* Generate 80386 code? */
-#undef I386_ONLY
-
-#undef OPENSSL_UNISTD
-#define OPENSSL_UNISTD  <unistd.h>
-
-#undef OPENSSL_EXPORT_VAR_AS_FUNCTION
-
-/*
- * The following are cipher-specific, but are part of the public API.
- */
-#if !defined (OPENSSL_SYS_UEFI)
-  #undef BN_LLONG
-/* Only one for the following should be defined */
-  #undef SIXTY_FOUR_BIT_LONG
-  #undef SIXTY_FOUR_BIT
-#define THIRTY_TWO_BIT
-#endif
-
-#define RC4_INT  unsigned int
+/* Autogenerated conditional openssl feature list starts here */
+/* Autogenerated conditional openssl feature list ends here */
 
 #ifdef  __cplusplus
 }
diff --git a/CryptoPkg/Library/Include/openssl/opensslconf_generated.h b/CryptoPkg/Library/Include/openssl/opensslconf_generated.h
new file mode 100644
index 000000000000..22a7216cc46c
--- /dev/null
+++ b/CryptoPkg/Library/Include/openssl/opensslconf_generated.h
@@ -0,0 +1,349 @@
+/*
+ * WARNING: do not edit!
+ * Generated from include/openssl/opensslconf.h.in
+ *
+ * Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved.
+ *
+ * Licensed under the OpenSSL license (the "License").  You may not use
+ * this file except in compliance with the License.  You can obtain a copy
+ * 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
+extern "C" {
+#endif
+
+#ifdef OPENSSL_ALGORITHM_DEFINES
+  #error OPENSSL_ALGORITHM_DEFINES no longer supported
+#endif
+
+/*
+ * OpenSSL was configured with the following options:
+ */
+
+#ifndef OPENSSL_SYS_UEFI
+#define OPENSSL_SYS_UEFI  1
+#endif
+#define OPENSSL_MIN_API  0x10100000L
+#ifndef OPENSSL_NO_BF
+#define OPENSSL_NO_BF
+#endif
+#ifndef OPENSSL_NO_BLAKE2
+#define OPENSSL_NO_BLAKE2
+#endif
+#ifndef OPENSSL_NO_CAMELLIA
+#define OPENSSL_NO_CAMELLIA
+#endif
+#ifndef OPENSSL_NO_CAST
+#define OPENSSL_NO_CAST
+#endif
+#ifndef OPENSSL_NO_CHACHA
+#define OPENSSL_NO_CHACHA
+#endif
+#ifndef OPENSSL_NO_CMS
+#define OPENSSL_NO_CMS
+#endif
+#ifndef OPENSSL_NO_CT
+#define OPENSSL_NO_CT
+#endif
+#ifndef OPENSSL_NO_DES
+#define OPENSSL_NO_DES
+#endif
+#ifndef OPENSSL_NO_DSA
+#define OPENSSL_NO_DSA
+#endif
+#if !FixedPcdGetBool (PcdOpensslEcEnabled)
+  #ifndef OPENSSL_NO_EC
+#define OPENSSL_NO_EC
+  #endif
+#endif
+#ifndef OPENSSL_NO_IDEA
+#define OPENSSL_NO_IDEA
+#endif
+#ifndef OPENSSL_NO_MD2
+#define OPENSSL_NO_MD2
+#endif
+#ifndef OPENSSL_NO_MD4
+#define OPENSSL_NO_MD4
+#endif
+#ifndef OPENSSL_NO_MDC2
+#define OPENSSL_NO_MDC2
+#endif
+#ifndef OPENSSL_NO_POLY1305
+#define OPENSSL_NO_POLY1305
+#endif
+#ifndef OPENSSL_NO_RC2
+#define OPENSSL_NO_RC2
+#endif
+#ifndef OPENSSL_NO_RC4
+#define OPENSSL_NO_RC4
+#endif
+#ifndef OPENSSL_NO_RC5
+#define OPENSSL_NO_RC5
+#endif
+#ifndef OPENSSL_NO_RMD160
+#define OPENSSL_NO_RMD160
+#endif
+#ifndef OPENSSL_NO_SEED
+#define OPENSSL_NO_SEED
+#endif
+#ifndef OPENSSL_NO_SM2
+#define OPENSSL_NO_SM2
+#endif
+#ifndef OPENSSL_NO_SRP
+#define OPENSSL_NO_SRP
+#endif
+#ifndef OPENSSL_NO_TS
+#define OPENSSL_NO_TS
+#endif
+#ifndef OPENSSL_NO_WHIRLPOOL
+#define OPENSSL_NO_WHIRLPOOL
+#endif
+#ifndef OPENSSL_RAND_SEED_NONE
+#define OPENSSL_RAND_SEED_NONE
+#endif
+#ifndef OPENSSL_NO_AFALGENG
+#define OPENSSL_NO_AFALGENG
+#endif
+#ifndef OPENSSL_NO_APPS
+#define OPENSSL_NO_APPS
+#endif
+#ifndef OPENSSL_NO_ASAN
+#define OPENSSL_NO_ASAN
+#endif
+#ifndef OPENSSL_NO_ASYNC
+#define OPENSSL_NO_ASYNC
+#endif
+#ifndef OPENSSL_NO_AUTOERRINIT
+#define OPENSSL_NO_AUTOERRINIT
+#endif
+#ifndef OPENSSL_NO_AUTOLOAD_CONFIG
+#define OPENSSL_NO_AUTOLOAD_CONFIG
+#endif
+#ifndef OPENSSL_NO_CAPIENG
+#define OPENSSL_NO_CAPIENG
+#endif
+#ifndef OPENSSL_NO_CRYPTO_MDEBUG
+#define OPENSSL_NO_CRYPTO_MDEBUG
+#endif
+#ifndef OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
+#define OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
+#endif
+#ifndef OPENSSL_NO_DEPRECATED
+#define OPENSSL_NO_DEPRECATED
+#endif
+#ifndef OPENSSL_NO_DEVCRYPTOENG
+#define OPENSSL_NO_DEVCRYPTOENG
+#endif
+#ifndef OPENSSL_NO_DGRAM
+#define OPENSSL_NO_DGRAM
+#endif
+#ifndef OPENSSL_NO_DTLS
+#define OPENSSL_NO_DTLS
+#endif
+#ifndef OPENSSL_NO_DTLS1
+#define OPENSSL_NO_DTLS1
+#endif
+#ifndef OPENSSL_NO_DTLS1_2
+#define OPENSSL_NO_DTLS1_2
+#endif
+#ifndef OPENSSL_NO_EC2M
+#define OPENSSL_NO_EC2M
+#endif
+#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
+#define OPENSSL_NO_EC_NISTP_64_GCC_128
+#endif
+#ifndef OPENSSL_NO_ECDH
+#define OPENSSL_NO_ECDH
+#endif
+#ifndef OPENSSL_NO_ECDSA
+#define OPENSSL_NO_ECDSA
+#endif
+#ifndef OPENSSL_NO_EGD
+#define OPENSSL_NO_EGD
+#endif
+#ifndef OPENSSL_NO_ENGINE
+#define OPENSSL_NO_ENGINE
+#endif
+#ifndef OPENSSL_NO_ERR
+#define OPENSSL_NO_ERR
+#endif
+#ifndef OPENSSL_NO_EXTERNAL_TESTS
+#define OPENSSL_NO_EXTERNAL_TESTS
+#endif
+#ifndef OPENSSL_NO_FILENAMES
+#define OPENSSL_NO_FILENAMES
+#endif
+#ifndef OPENSSL_NO_FUZZ_AFL
+#define OPENSSL_NO_FUZZ_AFL
+#endif
+#ifndef OPENSSL_NO_FUZZ_LIBFUZZER
+#define OPENSSL_NO_FUZZ_LIBFUZZER
+#endif
+#ifndef OPENSSL_NO_GOST
+#define OPENSSL_NO_GOST
+#endif
+#ifndef OPENSSL_NO_HEARTBEATS
+#define OPENSSL_NO_HEARTBEATS
+#endif
+#ifndef OPENSSL_NO_HW
+#define OPENSSL_NO_HW
+#endif
+#ifndef OPENSSL_NO_MSAN
+#define OPENSSL_NO_MSAN
+#endif
+#ifndef OPENSSL_NO_OCB
+#define OPENSSL_NO_OCB
+#endif
+#ifndef OPENSSL_NO_POSIX_IO
+#define OPENSSL_NO_POSIX_IO
+#endif
+#ifndef OPENSSL_NO_RFC3779
+#define OPENSSL_NO_RFC3779
+#endif
+#ifndef OPENSSL_NO_SCRYPT
+#define OPENSSL_NO_SCRYPT
+#endif
+#ifndef OPENSSL_NO_SCTP
+#define OPENSSL_NO_SCTP
+#endif
+#ifndef OPENSSL_NO_SOCK
+#define OPENSSL_NO_SOCK
+#endif
+#ifndef OPENSSL_NO_SSL_TRACE
+#define OPENSSL_NO_SSL_TRACE
+#endif
+#ifndef OPENSSL_NO_SSL3
+#define OPENSSL_NO_SSL3
+#endif
+#ifndef OPENSSL_NO_SSL3_METHOD
+#define OPENSSL_NO_SSL3_METHOD
+#endif
+#ifndef OPENSSL_NO_STDIO
+#define OPENSSL_NO_STDIO
+#endif
+#ifndef OPENSSL_NO_TESTS
+#define OPENSSL_NO_TESTS
+#endif
+#ifndef OPENSSL_NO_TLS1_3
+#define OPENSSL_NO_TLS1_3
+#endif
+#ifndef OPENSSL_NO_UBSAN
+#define OPENSSL_NO_UBSAN
+#endif
+#ifndef OPENSSL_NO_UI_CONSOLE
+#define OPENSSL_NO_UI_CONSOLE
+#endif
+#ifndef OPENSSL_NO_UNIT_TEST
+#define OPENSSL_NO_UNIT_TEST
+#endif
+#ifndef OPENSSL_NO_WEAK_SSL_CIPHERS
+#define OPENSSL_NO_WEAK_SSL_CIPHERS
+#endif
+#ifndef OPENSSL_NO_DYNAMIC_ENGINE
+#define OPENSSL_NO_DYNAMIC_ENGINE
+#endif
+
+/*
+ * Sometimes OPENSSSL_NO_xxx ends up with an empty file and some compilers
+ * don't like that.  This will hopefully silence them.
+ */
+#define NON_EMPTY_TRANSLATION_UNIT  static void *dummy = &dummy;
+
+/*
+ * Applications should use -DOPENSSL_API_COMPAT=<version> to suppress the
+ * declarations of functions deprecated in or before <version>. Otherwise, they
+ * still won't see them if the library has been built to disable deprecated
+ * functions.
+ */
+#ifndef DECLARE_DEPRECATED
+#define DECLARE_DEPRECATED(f)  f;
+  #ifdef __GNUC__
+    #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0)
+      #undef DECLARE_DEPRECATED
+#define DECLARE_DEPRECATED(f)  f __attribute__ ((deprecated));
+    #endif
+  #elif defined (__SUNPRO_C)
+    #if (__SUNPRO_C >= 0x5130)
+      #undef DECLARE_DEPRECATED
+#define DECLARE_DEPRECATED(f)  f __attribute__ ((deprecated));
+    #endif
+  #endif
+#endif
+
+#ifndef OPENSSL_FILE
+  #ifdef OPENSSL_NO_FILENAMES
+#define OPENSSL_FILE  ""
+#define OPENSSL_LINE  0
+  #else
+#define OPENSSL_FILE  __FILE__
+#define OPENSSL_LINE  __LINE__
+  #endif
+#endif
+
+#ifndef OPENSSL_MIN_API
+#define OPENSSL_MIN_API  0
+#endif
+
+#if !defined (OPENSSL_API_COMPAT) || OPENSSL_API_COMPAT < OPENSSL_MIN_API
+  #undef OPENSSL_API_COMPAT
+#define OPENSSL_API_COMPAT  OPENSSL_MIN_API
+#endif
+
+/*
+ * Do not deprecate things to be deprecated in version 1.2.0 before the
+ * OpenSSL version number matches.
+ */
+#if OPENSSL_VERSION_NUMBER < 0x10200000L
+#define DEPRECATEDIN_1_2_0(f)  f;
+#elif OPENSSL_API_COMPAT < 0x10200000L
+#define DEPRECATEDIN_1_2_0(f)  DECLARE_DEPRECATED(f)
+#else
+#define DEPRECATEDIN_1_2_0(f)
+#endif
+
+#if OPENSSL_API_COMPAT < 0x10100000L
+#define DEPRECATEDIN_1_1_0(f)  DECLARE_DEPRECATED(f)
+#else
+#define DEPRECATEDIN_1_1_0(f)
+#endif
+
+#if OPENSSL_API_COMPAT < 0x10000000L
+#define DEPRECATEDIN_1_0_0(f)  DECLARE_DEPRECATED(f)
+#else
+#define DEPRECATEDIN_1_0_0(f)
+#endif
+
+#if OPENSSL_API_COMPAT < 0x00908000L
+#define DEPRECATEDIN_0_9_8(f)  DECLARE_DEPRECATED(f)
+#else
+#define DEPRECATEDIN_0_9_8(f)
+#endif
+
+/* Generate 80386 code? */
+#undef I386_ONLY
+
+#undef OPENSSL_UNISTD
+#define OPENSSL_UNISTD  <unistd.h>
+
+#undef OPENSSL_EXPORT_VAR_AS_FUNCTION
+
+/*
+ * The following are cipher-specific, but are part of the public API.
+ */
+#if !defined (OPENSSL_SYS_UEFI)
+  #undef BN_LLONG
+/* Only one for the following should be defined */
+  #undef SIXTY_FOUR_BIT_LONG
+  #undef SIXTY_FOUR_BIT
+#define THIRTY_TWO_BIT
+#endif
+
+#define RC4_INT  unsigned int
+
+#ifdef  __cplusplus
+}
+#endif
-- 
2.31.1.windows.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH V2 3/5] CryptoPkg: Update process_files.pl to automatically add PCD config option
  2022-05-10  4:40 [PATCH V2 0/5] CryptoPkg/openssl: Enable EC conditionally yi1 li
  2022-05-10  4:40 ` [PATCH V2 1/5] CryptoPkg: Rename PCD about openssl EC configuration yi1 li
  2022-05-10  4:40 ` [PATCH V2 2/5] CryptoPkg: Separate auto-generated openssl config and edk2 openssl config yi1 li
@ 2022-05-10  4:40 ` yi1 li
  2022-05-10  4:40 ` [PATCH V2 4/5] CryptoPkg/openssl: update generated files yi1 li
  2022-05-10  4:40 ` [PATCH V2 5/5] CryptoPkg/openssl: disable codestyle checks for " yi1 li
  4 siblings, 0 replies; 10+ messages in thread
From: yi1 li @ 2022-05-10  4:40 UTC (permalink / raw)
  To: devel
  Cc: Yi Li, Jiewen Yao, Jian J Wang, Xiaoyu Lu, Guomin Jiang,
	Gerd Hoffmann

Recommend from Gerd:
(2) Keep the EC config option, but update process_files.pl to
  automatically add the PcdEcEnabled config option handling
  to the files it generates.

When remove 'no-ec' from openssl configure list, will automatically remove
'OPENSSL_NO_EC', 'OPENSSL_NO_ECDH', 'OPENSSL_NO_ECDSA', 'OPENSSL_NO_TLS1_3',
from header, and add '/ec/.', '/sm2/.' files to INF files.

Signed-off-by: Yi Li <yi1.li@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
---
 CryptoPkg/Library/OpensslLib/process_files.pl | 77 ++++++++++++++++++-
 1 file changed, 74 insertions(+), 3 deletions(-)

diff --git a/CryptoPkg/Library/OpensslLib/process_files.pl b/CryptoPkg/Library/OpensslLib/process_files.pl
index 2ebfbbbca0de..545f2182842b 100755
--- a/CryptoPkg/Library/OpensslLib/process_files.pl
+++ b/CryptoPkg/Library/OpensslLib/process_files.pl
@@ -81,6 +81,19 @@ my $uefi_config;
 my $extension;
 my $arch;
 my @inf;
+#
+# Use PCD to conditionally enable certain openssl features.
+# $conditional_feature contains pcd_name:fetures_names pairs
+# of conditional features.
+# @conditional_feature_dir contains relative_path:pcd_name pairs
+# of conditional features in openssl, MUST correspond to the content
+# in $conditional_feature.
+#
+# Configure list [openssl_configuration : new_define_list : new_file_list : pcd]
+# 1. no-ec : {NO_EC, NO_ECDH, NO_ECDSA, NO_TLS1_3, NO_SM2} : {/ec/, /sm2/} : PcdOpensslEcEnabled
+#
+my %conditional_feature = ("PcdOpensslEcEnabled"=>["EC", "ECDH", "ECDSA", "TLS1_3", "SM2"]);
+my %conditional_feature_dir = ("/ec/"=>"PcdOpensslEcEnabled", "/sm2/"=>"PcdOpensslEcEnabled");
 
 BEGIN {
     $inf_file = "OpensslLib.inf";
@@ -282,7 +295,13 @@ foreach my $product ((@{$unified_info{libraries}},
                 push @sslfilelist, '  $(OPENSSL_PATH)/' . $s . "\r\n";
                 next;
             }
-            push @cryptofilelist, '  $(OPENSSL_PATH)/' . $s . "\r\n";
+            push @cryptofilelist, '  $(OPENSSL_PATH)/' . $s;
+            foreach (keys(%conditional_feature_dir)) {
+                if ($s =~ $_) {
+                    push @cryptofilelist, '      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.' . $conditional_feature_dir{$_};
+                }
+            }
+            push @cryptofilelist, "\r\n";
         }
     }
 }
@@ -311,7 +330,13 @@ foreach (@headers){
     push @sslfilelist, '  $(OPENSSL_PATH)/' . $_ . "\r\n";
     next;
   }
-  push @cryptofilelist, '  $(OPENSSL_PATH)/' . $_ . "\r\n";
+  push @cryptofilelist, '  $(OPENSSL_PATH)/' . $_;
+  foreach my $conditional_key (keys(%conditional_feature_dir)) {
+    if ($_ =~ $conditional_key) {
+        push @cryptofilelist, '      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.' . $conditional_feature_dir{$conditional_key};
+    }
+  }
+  push @cryptofilelist, "\r\n";
 }
 
 
@@ -416,7 +441,7 @@ print "\n--> Duplicating opensslconf.h into Include/openssl ... ";
 system(
     "perl -pe 's/\\n/\\r\\n/' " .
     "< " . $OPENSSL_PATH . "/include/openssl/opensslconf.h " .
-    "> " . $OPENSSL_PATH . "/../../Include/openssl/opensslconf.h"
+    "> " . $OPENSSL_PATH . "/../../Include/openssl/opensslconf_generated.h"
     ) == 0 ||
     die "Cannot copy opensslconf.h!";
 print "Done!";
@@ -428,6 +453,52 @@ system(
     "> " . $OPENSSL_PATH . "/../../Include/crypto/dso_conf.h"
     ) == 0 ||
     die "Cannot copy dso_conf.h!";
+print "Done!";
+
+#
+# Add conditional feature to opensslconf.h
+#
+my $conf_file = "../Include/openssl/opensslconf.h";
+my @conf_raw = ();
+my @conditional_define = ();
+print "\n--> Updating conditional feature in $conf_file ... ";
+
+foreach my $pcd_name (keys(%conditional_feature)) {
+    push @conditional_define, "#if !FixedPcdGetBool ($pcd_name)\r\n";
+    foreach (@{$conditional_feature{$pcd_name}}) {
+        push @conditional_define, "# ifndef OPENSSL_NO_$_\r\n";
+        push @conditional_define, "#  define OPENSSL_NO_$_\r\n";
+        push @conditional_define, "# endif\r\n";
+    }
+    push @conditional_define, "#endif\r\n";
+}
+
+open( FD, "<" . $conf_file ) ||
+    die $conf_file;
+foreach (<FD>) {
+    # Insert conditional define to the begin of opensslconf.h
+    if ($_ =~ "Autogenerated conditional openssl feature list starts here") {
+        push @conf_raw, $_, @conditional_define;
+        $subbing = 1;
+        next;
+    }
+    if ($_ =~ "Autogenerated conditional openssl feature list ends here") {
+        push @conf_raw, $_;
+        $subbing = 0;
+        next;
+    }
+    push @conf_raw, $_
+        unless ($subbing);
+}
+close(FD) ||
+    die $conf_file;
+
+open( FD, ">" . $conf_file ) ||
+    die $conf_file;
+print( FD @conf_raw ) ||
+    die $conf_file;
+close(FD) ||
+    die $conf_file;
 print "Done!\n";
 
 print "\nProcessing Files Done!\n";
-- 
2.31.1.windows.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH V2 4/5] CryptoPkg/openssl: update generated files
  2022-05-10  4:40 [PATCH V2 0/5] CryptoPkg/openssl: Enable EC conditionally yi1 li
                   ` (2 preceding siblings ...)
  2022-05-10  4:40 ` [PATCH V2 3/5] CryptoPkg: Update process_files.pl to automatically add PCD config option yi1 li
@ 2022-05-10  4:40 ` yi1 li
  2022-05-10  4:40 ` [PATCH V2 5/5] CryptoPkg/openssl: disable codestyle checks for " yi1 li
  4 siblings, 0 replies; 10+ messages in thread
From: yi1 li @ 2022-05-10  4:40 UTC (permalink / raw)
  To: devel
  Cc: Yi Li, Jiewen Yao, Jian J Wang, Xiaoyu Lu, Guomin Jiang,
	Gerd Hoffmann

Run process_files.pl with the current openssl submodule version.

Signed-off-by: Yi Li <yi1.li@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
---
 CryptoPkg/Library/Include/crypto/dso_conf.h   |   7 +-
 .../Library/Include/openssl/opensslconf.h     |  17 ++
 .../Include/openssl/opensslconf_generated.h   | 240 ++++++++----------
 CryptoPkg/Library/OpensslLib/OpensslLib.inf   |  34 +--
 .../Library/OpensslLib/OpensslLibCrypto.inf   |  96 +++----
 5 files changed, 201 insertions(+), 193 deletions(-)

diff --git a/CryptoPkg/Library/Include/crypto/dso_conf.h b/CryptoPkg/Library/Include/crypto/dso_conf.h
index b9c38b416697..95f4db2b1586 100644
--- a/CryptoPkg/Library/Include/crypto/dso_conf.h
+++ b/CryptoPkg/Library/Include/crypto/dso_conf.h
@@ -1,6 +1,5 @@
 /* WARNING: do not edit! */
 /* Generated from include/crypto/dso_conf.h.in */
-
 /*
  * Copyright 2016-2019 The OpenSSL Project Authors. All Rights Reserved.
  *
@@ -11,7 +10,7 @@
  */
 
 #ifndef OSSL_CRYPTO_DSO_CONF_H
-#define OSSL_CRYPTO_DSO_CONF_H
-#define DSO_NONE
-#define DSO_EXTENSION  ".so"
+# define OSSL_CRYPTO_DSO_CONF_H
+# define DSO_NONE
+# define DSO_EXTENSION ".so"
 #endif
diff --git a/CryptoPkg/Library/Include/openssl/opensslconf.h b/CryptoPkg/Library/Include/openssl/opensslconf.h
index 98962e0fe378..53dd8c3efbe6 100644
--- a/CryptoPkg/Library/Include/openssl/opensslconf.h
+++ b/CryptoPkg/Library/Include/openssl/opensslconf.h
@@ -17,6 +17,23 @@ extern "C" {
 #endif
 
 /* Autogenerated conditional openssl feature list starts here */
+#if !FixedPcdGetBool (PcdOpensslEcEnabled)
+# ifndef OPENSSL_NO_EC
+#  define OPENSSL_NO_EC
+# endif
+# ifndef OPENSSL_NO_ECDH
+#  define OPENSSL_NO_ECDH
+# endif
+# ifndef OPENSSL_NO_ECDSA
+#  define OPENSSL_NO_ECDSA
+# endif
+# ifndef OPENSSL_NO_TLS1_3
+#  define OPENSSL_NO_TLS1_3
+# endif
+# ifndef OPENSSL_NO_SM2
+#  define OPENSSL_NO_SM2
+# endif
+#endif
 /* Autogenerated conditional openssl feature list ends here */
 
 #ifdef  __cplusplus
diff --git a/CryptoPkg/Library/Include/openssl/opensslconf_generated.h b/CryptoPkg/Library/Include/openssl/opensslconf_generated.h
index 22a7216cc46c..09a6641ffcf9 100644
--- a/CryptoPkg/Library/Include/openssl/opensslconf_generated.h
+++ b/CryptoPkg/Library/Include/openssl/opensslconf_generated.h
@@ -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
@@ -17,7 +17,7 @@ extern "C" {
 #endif
 
 #ifdef OPENSSL_ALGORITHM_DEFINES
-  #error OPENSSL_ALGORITHM_DEFINES no longer supported
+# error OPENSSL_ALGORITHM_DEFINES no longer supported
 #endif
 
 /*
@@ -25,233 +25,217 @@ extern "C" {
  */
 
 #ifndef OPENSSL_SYS_UEFI
-#define OPENSSL_SYS_UEFI  1
+# define OPENSSL_SYS_UEFI 1
 #endif
-#define OPENSSL_MIN_API  0x10100000L
+#define OPENSSL_MIN_API 0x10100000L
 #ifndef OPENSSL_NO_BF
-#define OPENSSL_NO_BF
+# define OPENSSL_NO_BF
 #endif
 #ifndef OPENSSL_NO_BLAKE2
-#define OPENSSL_NO_BLAKE2
+# define OPENSSL_NO_BLAKE2
 #endif
 #ifndef OPENSSL_NO_CAMELLIA
-#define OPENSSL_NO_CAMELLIA
+# define OPENSSL_NO_CAMELLIA
 #endif
 #ifndef OPENSSL_NO_CAST
-#define OPENSSL_NO_CAST
+# define OPENSSL_NO_CAST
 #endif
 #ifndef OPENSSL_NO_CHACHA
-#define OPENSSL_NO_CHACHA
+# define OPENSSL_NO_CHACHA
 #endif
 #ifndef OPENSSL_NO_CMS
-#define OPENSSL_NO_CMS
+# define OPENSSL_NO_CMS
 #endif
 #ifndef OPENSSL_NO_CT
-#define OPENSSL_NO_CT
+# define OPENSSL_NO_CT
 #endif
 #ifndef OPENSSL_NO_DES
-#define OPENSSL_NO_DES
+# define OPENSSL_NO_DES
 #endif
 #ifndef OPENSSL_NO_DSA
-#define OPENSSL_NO_DSA
-#endif
-#if !FixedPcdGetBool (PcdOpensslEcEnabled)
-  #ifndef OPENSSL_NO_EC
-#define OPENSSL_NO_EC
-  #endif
+# define OPENSSL_NO_DSA
 #endif
 #ifndef OPENSSL_NO_IDEA
-#define OPENSSL_NO_IDEA
+# define OPENSSL_NO_IDEA
 #endif
 #ifndef OPENSSL_NO_MD2
-#define OPENSSL_NO_MD2
+# define OPENSSL_NO_MD2
 #endif
 #ifndef OPENSSL_NO_MD4
-#define OPENSSL_NO_MD4
+# define OPENSSL_NO_MD4
 #endif
 #ifndef OPENSSL_NO_MDC2
-#define OPENSSL_NO_MDC2
+# define OPENSSL_NO_MDC2
 #endif
 #ifndef OPENSSL_NO_POLY1305
-#define OPENSSL_NO_POLY1305
+# define OPENSSL_NO_POLY1305
 #endif
 #ifndef OPENSSL_NO_RC2
-#define OPENSSL_NO_RC2
+# define OPENSSL_NO_RC2
 #endif
 #ifndef OPENSSL_NO_RC4
-#define OPENSSL_NO_RC4
+# define OPENSSL_NO_RC4
 #endif
 #ifndef OPENSSL_NO_RC5
-#define OPENSSL_NO_RC5
+# define OPENSSL_NO_RC5
 #endif
 #ifndef OPENSSL_NO_RMD160
-#define OPENSSL_NO_RMD160
+# define OPENSSL_NO_RMD160
 #endif
 #ifndef OPENSSL_NO_SEED
-#define OPENSSL_NO_SEED
-#endif
-#ifndef OPENSSL_NO_SM2
-#define OPENSSL_NO_SM2
+# define OPENSSL_NO_SEED
 #endif
 #ifndef OPENSSL_NO_SRP
-#define OPENSSL_NO_SRP
+# define OPENSSL_NO_SRP
 #endif
 #ifndef OPENSSL_NO_TS
-#define OPENSSL_NO_TS
+# define OPENSSL_NO_TS
 #endif
 #ifndef OPENSSL_NO_WHIRLPOOL
-#define OPENSSL_NO_WHIRLPOOL
+# define OPENSSL_NO_WHIRLPOOL
 #endif
 #ifndef OPENSSL_RAND_SEED_NONE
-#define OPENSSL_RAND_SEED_NONE
+# define OPENSSL_RAND_SEED_NONE
 #endif
 #ifndef OPENSSL_NO_AFALGENG
-#define OPENSSL_NO_AFALGENG
+# define OPENSSL_NO_AFALGENG
 #endif
 #ifndef OPENSSL_NO_APPS
-#define OPENSSL_NO_APPS
+# define OPENSSL_NO_APPS
 #endif
 #ifndef OPENSSL_NO_ASAN
-#define OPENSSL_NO_ASAN
+# define OPENSSL_NO_ASAN
 #endif
 #ifndef OPENSSL_NO_ASYNC
-#define OPENSSL_NO_ASYNC
+# define OPENSSL_NO_ASYNC
 #endif
 #ifndef OPENSSL_NO_AUTOERRINIT
-#define OPENSSL_NO_AUTOERRINIT
+# define OPENSSL_NO_AUTOERRINIT
 #endif
 #ifndef OPENSSL_NO_AUTOLOAD_CONFIG
-#define OPENSSL_NO_AUTOLOAD_CONFIG
+# define OPENSSL_NO_AUTOLOAD_CONFIG
 #endif
 #ifndef OPENSSL_NO_CAPIENG
-#define OPENSSL_NO_CAPIENG
+# define OPENSSL_NO_CAPIENG
 #endif
 #ifndef OPENSSL_NO_CRYPTO_MDEBUG
-#define OPENSSL_NO_CRYPTO_MDEBUG
+# define OPENSSL_NO_CRYPTO_MDEBUG
 #endif
 #ifndef OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
-#define OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
+# define OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
 #endif
 #ifndef OPENSSL_NO_DEPRECATED
-#define OPENSSL_NO_DEPRECATED
+# define OPENSSL_NO_DEPRECATED
 #endif
 #ifndef OPENSSL_NO_DEVCRYPTOENG
-#define OPENSSL_NO_DEVCRYPTOENG
+# define OPENSSL_NO_DEVCRYPTOENG
 #endif
 #ifndef OPENSSL_NO_DGRAM
-#define OPENSSL_NO_DGRAM
+# define OPENSSL_NO_DGRAM
 #endif
 #ifndef OPENSSL_NO_DTLS
-#define OPENSSL_NO_DTLS
+# define OPENSSL_NO_DTLS
 #endif
 #ifndef OPENSSL_NO_DTLS1
-#define OPENSSL_NO_DTLS1
+# define OPENSSL_NO_DTLS1
 #endif
 #ifndef OPENSSL_NO_DTLS1_2
-#define OPENSSL_NO_DTLS1_2
+# define OPENSSL_NO_DTLS1_2
 #endif
 #ifndef OPENSSL_NO_EC2M
-#define OPENSSL_NO_EC2M
+# define OPENSSL_NO_EC2M
 #endif
 #ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
-#define OPENSSL_NO_EC_NISTP_64_GCC_128
-#endif
-#ifndef OPENSSL_NO_ECDH
-#define OPENSSL_NO_ECDH
-#endif
-#ifndef OPENSSL_NO_ECDSA
-#define OPENSSL_NO_ECDSA
+# define OPENSSL_NO_EC_NISTP_64_GCC_128
 #endif
 #ifndef OPENSSL_NO_EGD
-#define OPENSSL_NO_EGD
+# define OPENSSL_NO_EGD
 #endif
 #ifndef OPENSSL_NO_ENGINE
-#define OPENSSL_NO_ENGINE
+# define OPENSSL_NO_ENGINE
 #endif
 #ifndef OPENSSL_NO_ERR
-#define OPENSSL_NO_ERR
+# define OPENSSL_NO_ERR
 #endif
 #ifndef OPENSSL_NO_EXTERNAL_TESTS
-#define OPENSSL_NO_EXTERNAL_TESTS
+# define OPENSSL_NO_EXTERNAL_TESTS
 #endif
 #ifndef OPENSSL_NO_FILENAMES
-#define OPENSSL_NO_FILENAMES
+# define OPENSSL_NO_FILENAMES
 #endif
 #ifndef OPENSSL_NO_FUZZ_AFL
-#define OPENSSL_NO_FUZZ_AFL
+# define OPENSSL_NO_FUZZ_AFL
 #endif
 #ifndef OPENSSL_NO_FUZZ_LIBFUZZER
-#define OPENSSL_NO_FUZZ_LIBFUZZER
+# define OPENSSL_NO_FUZZ_LIBFUZZER
 #endif
 #ifndef OPENSSL_NO_GOST
-#define OPENSSL_NO_GOST
+# define OPENSSL_NO_GOST
 #endif
 #ifndef OPENSSL_NO_HEARTBEATS
-#define OPENSSL_NO_HEARTBEATS
+# define OPENSSL_NO_HEARTBEATS
 #endif
 #ifndef OPENSSL_NO_HW
-#define OPENSSL_NO_HW
+# define OPENSSL_NO_HW
 #endif
 #ifndef OPENSSL_NO_MSAN
-#define OPENSSL_NO_MSAN
+# define OPENSSL_NO_MSAN
 #endif
 #ifndef OPENSSL_NO_OCB
-#define OPENSSL_NO_OCB
+# define OPENSSL_NO_OCB
 #endif
 #ifndef OPENSSL_NO_POSIX_IO
-#define OPENSSL_NO_POSIX_IO
+# define OPENSSL_NO_POSIX_IO
 #endif
 #ifndef OPENSSL_NO_RFC3779
-#define OPENSSL_NO_RFC3779
+# define OPENSSL_NO_RFC3779
 #endif
 #ifndef OPENSSL_NO_SCRYPT
-#define OPENSSL_NO_SCRYPT
+# define OPENSSL_NO_SCRYPT
 #endif
 #ifndef OPENSSL_NO_SCTP
-#define OPENSSL_NO_SCTP
+# define OPENSSL_NO_SCTP
 #endif
 #ifndef OPENSSL_NO_SOCK
-#define OPENSSL_NO_SOCK
+# define OPENSSL_NO_SOCK
 #endif
 #ifndef OPENSSL_NO_SSL_TRACE
-#define OPENSSL_NO_SSL_TRACE
+# define OPENSSL_NO_SSL_TRACE
 #endif
 #ifndef OPENSSL_NO_SSL3
-#define OPENSSL_NO_SSL3
+# define OPENSSL_NO_SSL3
 #endif
 #ifndef OPENSSL_NO_SSL3_METHOD
-#define OPENSSL_NO_SSL3_METHOD
+# define OPENSSL_NO_SSL3_METHOD
 #endif
 #ifndef OPENSSL_NO_STDIO
-#define OPENSSL_NO_STDIO
+# define OPENSSL_NO_STDIO
 #endif
 #ifndef OPENSSL_NO_TESTS
-#define OPENSSL_NO_TESTS
-#endif
-#ifndef OPENSSL_NO_TLS1_3
-#define OPENSSL_NO_TLS1_3
+# define OPENSSL_NO_TESTS
 #endif
 #ifndef OPENSSL_NO_UBSAN
-#define OPENSSL_NO_UBSAN
+# define OPENSSL_NO_UBSAN
 #endif
 #ifndef OPENSSL_NO_UI_CONSOLE
-#define OPENSSL_NO_UI_CONSOLE
+# define OPENSSL_NO_UI_CONSOLE
 #endif
 #ifndef OPENSSL_NO_UNIT_TEST
-#define OPENSSL_NO_UNIT_TEST
+# define OPENSSL_NO_UNIT_TEST
 #endif
 #ifndef OPENSSL_NO_WEAK_SSL_CIPHERS
-#define OPENSSL_NO_WEAK_SSL_CIPHERS
+# define OPENSSL_NO_WEAK_SSL_CIPHERS
 #endif
 #ifndef OPENSSL_NO_DYNAMIC_ENGINE
-#define OPENSSL_NO_DYNAMIC_ENGINE
+# define OPENSSL_NO_DYNAMIC_ENGINE
 #endif
 
+
 /*
  * Sometimes OPENSSSL_NO_xxx ends up with an empty file and some compilers
  * don't like that.  This will hopefully silence them.
  */
-#define NON_EMPTY_TRANSLATION_UNIT  static void *dummy = &dummy;
+#define NON_EMPTY_TRANSLATION_UNIT static void *dummy = &dummy;
 
 /*
  * Applications should use -DOPENSSL_API_COMPAT=<version> to suppress the
@@ -260,37 +244,37 @@ extern "C" {
  * functions.
  */
 #ifndef DECLARE_DEPRECATED
-#define DECLARE_DEPRECATED(f)  f;
-  #ifdef __GNUC__
-    #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0)
-      #undef DECLARE_DEPRECATED
-#define DECLARE_DEPRECATED(f)  f __attribute__ ((deprecated));
-    #endif
-  #elif defined (__SUNPRO_C)
-    #if (__SUNPRO_C >= 0x5130)
-      #undef DECLARE_DEPRECATED
-#define DECLARE_DEPRECATED(f)  f __attribute__ ((deprecated));
-    #endif
-  #endif
+# define DECLARE_DEPRECATED(f)   f;
+# ifdef __GNUC__
+#  if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0)
+#   undef DECLARE_DEPRECATED
+#   define DECLARE_DEPRECATED(f)    f __attribute__ ((deprecated));
+#  endif
+# elif defined(__SUNPRO_C)
+#  if (__SUNPRO_C >= 0x5130)
+#   undef DECLARE_DEPRECATED
+#   define DECLARE_DEPRECATED(f)    f __attribute__ ((deprecated));
+#  endif
+# endif
 #endif
 
 #ifndef OPENSSL_FILE
-  #ifdef OPENSSL_NO_FILENAMES
-#define OPENSSL_FILE  ""
-#define OPENSSL_LINE  0
-  #else
-#define OPENSSL_FILE  __FILE__
-#define OPENSSL_LINE  __LINE__
-  #endif
+# ifdef OPENSSL_NO_FILENAMES
+#  define OPENSSL_FILE ""
+#  define OPENSSL_LINE 0
+# else
+#  define OPENSSL_FILE __FILE__
+#  define OPENSSL_LINE __LINE__
+# endif
 #endif
 
 #ifndef OPENSSL_MIN_API
-#define OPENSSL_MIN_API  0
+# define OPENSSL_MIN_API 0
 #endif
 
-#if !defined (OPENSSL_API_COMPAT) || OPENSSL_API_COMPAT < OPENSSL_MIN_API
-  #undef OPENSSL_API_COMPAT
-#define OPENSSL_API_COMPAT  OPENSSL_MIN_API
+#if !defined(OPENSSL_API_COMPAT) || OPENSSL_API_COMPAT < OPENSSL_MIN_API
+# undef OPENSSL_API_COMPAT
+# define OPENSSL_API_COMPAT OPENSSL_MIN_API
 #endif
 
 /*
@@ -298,51 +282,51 @@ extern "C" {
  * OpenSSL version number matches.
  */
 #if OPENSSL_VERSION_NUMBER < 0x10200000L
-#define DEPRECATEDIN_1_2_0(f)  f;
+# define DEPRECATEDIN_1_2_0(f)   f;
 #elif OPENSSL_API_COMPAT < 0x10200000L
-#define DEPRECATEDIN_1_2_0(f)  DECLARE_DEPRECATED(f)
+# define DEPRECATEDIN_1_2_0(f)   DECLARE_DEPRECATED(f)
 #else
-#define DEPRECATEDIN_1_2_0(f)
+# define DEPRECATEDIN_1_2_0(f)
 #endif
 
 #if OPENSSL_API_COMPAT < 0x10100000L
-#define DEPRECATEDIN_1_1_0(f)  DECLARE_DEPRECATED(f)
+# define DEPRECATEDIN_1_1_0(f)   DECLARE_DEPRECATED(f)
 #else
-#define DEPRECATEDIN_1_1_0(f)
+# define DEPRECATEDIN_1_1_0(f)
 #endif
 
 #if OPENSSL_API_COMPAT < 0x10000000L
-#define DEPRECATEDIN_1_0_0(f)  DECLARE_DEPRECATED(f)
+# define DEPRECATEDIN_1_0_0(f)   DECLARE_DEPRECATED(f)
 #else
-#define DEPRECATEDIN_1_0_0(f)
+# define DEPRECATEDIN_1_0_0(f)
 #endif
 
 #if OPENSSL_API_COMPAT < 0x00908000L
-#define DEPRECATEDIN_0_9_8(f)  DECLARE_DEPRECATED(f)
+# define DEPRECATEDIN_0_9_8(f)   DECLARE_DEPRECATED(f)
 #else
-#define DEPRECATEDIN_0_9_8(f)
+# define DEPRECATEDIN_0_9_8(f)
 #endif
 
 /* Generate 80386 code? */
 #undef I386_ONLY
 
 #undef OPENSSL_UNISTD
-#define OPENSSL_UNISTD  <unistd.h>
+#define OPENSSL_UNISTD <unistd.h>
 
 #undef OPENSSL_EXPORT_VAR_AS_FUNCTION
 
 /*
  * The following are cipher-specific, but are part of the public API.
  */
-#if !defined (OPENSSL_SYS_UEFI)
-  #undef BN_LLONG
+#if !defined(OPENSSL_SYS_UEFI)
+# undef BN_LLONG
 /* Only one for the following should be defined */
-  #undef SIXTY_FOUR_BIT_LONG
-  #undef SIXTY_FOUR_BIT
-#define THIRTY_TWO_BIT
+# undef SIXTY_FOUR_BIT_LONG
+# undef SIXTY_FOUR_BIT
+# define THIRTY_TWO_BIT
 #endif
 
-#define RC4_INT  unsigned int
+#define RC4_INT unsigned int
 
 #ifdef  __cplusplus
 }
diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.inf b/CryptoPkg/Library/OpensslLib/OpensslLib.inf
index a92eefcc9466..c7ceb5b9df1e 100644
--- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf
+++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf
@@ -200,40 +200,40 @@
   $(OPENSSL_PATH)/crypto/dso/dso_win32.c
   $(OPENSSL_PATH)/crypto/ebcdic.c
   $(OPENSSL_PATH)/crypto/ec/curve25519.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/arch_32/f_impl.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/curve448.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/arch_32/f_impl.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/curve448.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/ec/curve448/curve448_tables.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/ec/curve448/eddsa.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/ec/curve448/f_generic.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/scalar.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec2_oct.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/scalar.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec2_oct.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/ec/ec2_smpl.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/ec/ec_ameth.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_asn1.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_asn1.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/ec/ec_check.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/ec/ec_curve.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/ec/ec_cvt.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/ec/ec_err.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/ec/ec_key.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/ec/ec_kmeth.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_lib.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_mult.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_lib.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_mult.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/ec/ec_oct.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/ec/ec_pmeth.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/ec/ec_print.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/ec/ecdh_kdf.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecdh_ossl.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecdh_ossl.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/ec/ecdsa_ossl.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/ec/ecdsa_sign.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecdsa_vrf.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/eck_prn.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecdsa_vrf.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/eck_prn.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/ec/ecp_mont.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/ec/ecp_nist.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/ec/ecp_nistp224.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/ec/ecp_nistp256.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/ec/ecp_nistp521.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecp_nistputil.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecp_oct.c     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecp_nistputil.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecp_oct.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/ec/ecp_smpl.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/ec/ecx_meth.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/err/err.c
@@ -421,6 +421,10 @@
   $(OPENSSL_PATH)/crypto/siphash/siphash.c
   $(OPENSSL_PATH)/crypto/siphash/siphash_ameth.c
   $(OPENSSL_PATH)/crypto/siphash/siphash_pmeth.c
+  $(OPENSSL_PATH)/crypto/sm2/sm2_crypt.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/sm2/sm2_err.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/sm2/sm2_pmeth.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/sm2/sm2_sign.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/sm3/m_sm3.c
   $(OPENSSL_PATH)/crypto/sm3/sm3.c
   $(OPENSSL_PATH)/crypto/sm4/sm4.c
@@ -534,14 +538,14 @@
   $(OPENSSL_PATH)/crypto/dh/dh_local.h
   $(OPENSSL_PATH)/crypto/dso/dso_local.h
   $(OPENSSL_PATH)/crypto/ec/ec_local.h      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/curve448_local.h     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/curve448_local.h      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/ec/curve448/curve448utils.h      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/ec/curve448/ed448.h      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/ec/curve448/field.h      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/ec/curve448/point_448.h      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/word.h     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/word.h      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/ec/curve448/arch_32/arch_intrinsics.h      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/arch_32/f_impl.h     |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/arch_32/f_impl.h      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/evp/evp_local.h
   $(OPENSSL_PATH)/crypto/hmac/hmac_local.h
   $(OPENSSL_PATH)/crypto/lhash/lhash_local.h
diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
index 63f550f626db..63b4a8f3d83d 100644
--- a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
+++ b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
@@ -199,43 +199,43 @@
   $(OPENSSL_PATH)/crypto/dso/dso_vms.c
   $(OPENSSL_PATH)/crypto/dso/dso_win32.c
   $(OPENSSL_PATH)/crypto/ebcdic.c
-  $(OPENSSL_PATH)/crypto/ec/curve25519.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/arch_32/f_impl.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/curve448.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/curve448_tables.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/eddsa.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/f_generic.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/scalar.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec2_oct.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec2_smpl.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_ameth.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_asn1.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_check.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_curve.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_cvt.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_err.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_key.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_kmeth.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_lib.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_mult.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_oct.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_pmeth.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ec_print.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecdh_kdf.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecdh_ossl.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecdsa_ossl.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecdsa_sign.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecdsa_vrf.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/eck_prn.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecp_mont.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecp_nist.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecp_nistp224.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecp_nistp256.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecp_nistp521.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecp_nistputil.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecp_oct.c   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecp_smpl.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/ecx_meth.c    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve25519.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/arch_32/f_impl.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/curve448.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/curve448_tables.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/eddsa.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/f_generic.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/scalar.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec2_oct.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec2_smpl.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_ameth.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_asn1.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_check.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_curve.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_cvt.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_err.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_key.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_kmeth.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_lib.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_mult.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_oct.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_pmeth.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_print.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecdh_kdf.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecdh_ossl.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecdsa_ossl.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecdsa_sign.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecdsa_vrf.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/eck_prn.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecp_mont.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecp_nist.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecp_nistp224.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecp_nistp256.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecp_nistp521.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecp_nistputil.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecp_oct.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecp_smpl.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ecx_meth.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/err/err.c
   $(OPENSSL_PATH)/crypto/err/err_prn.c
   $(OPENSSL_PATH)/crypto/evp/bio_b64.c
@@ -421,6 +421,10 @@
   $(OPENSSL_PATH)/crypto/siphash/siphash.c
   $(OPENSSL_PATH)/crypto/siphash/siphash_ameth.c
   $(OPENSSL_PATH)/crypto/siphash/siphash_pmeth.c
+  $(OPENSSL_PATH)/crypto/sm2/sm2_crypt.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/sm2/sm2_err.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/sm2/sm2_pmeth.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/sm2/sm2_sign.c      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/sm3/m_sm3.c
   $(OPENSSL_PATH)/crypto/sm3/sm3.c
   $(OPENSSL_PATH)/crypto/sm4/sm4.c
@@ -533,15 +537,15 @@
   $(OPENSSL_PATH)/crypto/conf/conf_local.h
   $(OPENSSL_PATH)/crypto/dh/dh_local.h
   $(OPENSSL_PATH)/crypto/dso/dso_local.h
-  $(OPENSSL_PATH)/crypto/ec/ec_local.h    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/curve448_local.h   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/curve448utils.h    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/ed448.h    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/field.h    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/point_448.h    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/word.h   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/arch_32/arch_intrinsics.h    |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
-  $(OPENSSL_PATH)/crypto/ec/curve448/arch_32/f_impl.h   |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/ec_local.h      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/curve448_local.h      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/curve448utils.h      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/ed448.h      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/field.h      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/point_448.h      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/word.h      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/arch_32/arch_intrinsics.h      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
+  $(OPENSSL_PATH)/crypto/ec/curve448/arch_32/f_impl.h      |*|*|*|gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled
   $(OPENSSL_PATH)/crypto/evp/evp_local.h
   $(OPENSSL_PATH)/crypto/hmac/hmac_local.h
   $(OPENSSL_PATH)/crypto/lhash/lhash_local.h
-- 
2.31.1.windows.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH V2 5/5] CryptoPkg/openssl: disable codestyle checks for generated files
  2022-05-10  4:40 [PATCH V2 0/5] CryptoPkg/openssl: Enable EC conditionally yi1 li
                   ` (3 preceding siblings ...)
  2022-05-10  4:40 ` [PATCH V2 4/5] CryptoPkg/openssl: update generated files yi1 li
@ 2022-05-10  4:40 ` yi1 li
  4 siblings, 0 replies; 10+ messages in thread
From: yi1 li @ 2022-05-10  4:40 UTC (permalink / raw)
  To: devel
  Cc: Yi Li, Gerd Hoffmann, Jiewen Yao, Jian J Wang, Xiaoyu Lu,
	Guomin Jiang

Files generated by process_files.pl from openssl sources should not be checked for edk2 code style.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Yi Li <yi1.li@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
---
 CryptoPkg/CryptoPkg.ci.yaml | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/CryptoPkg/CryptoPkg.ci.yaml b/CryptoPkg/CryptoPkg.ci.yaml
index 396ca93dbe49..b939416a8272 100644
--- a/CryptoPkg/CryptoPkg.ci.yaml
+++ b/CryptoPkg/CryptoPkg.ci.yaml
@@ -26,6 +26,8 @@
         ## Both file path and directory path are accepted.
         "IgnoreFiles": [
             "Library/OpensslLib/openssl",
+            "Library/Include/openssl",
+            "Library/Include/crypto",
             # The unit testing folder is not to be checked
             "Test/UnitTest",
             # This has OpenSSL interfaces that aren't UEFI spec compliant
@@ -89,5 +91,14 @@
         "ExtendWords": [],           # words to extend to the dictionary for this package
         "IgnoreStandardPaths": [],   # Standard Plugin defined paths that should be ignore
         "AdditionalIncludePaths": [] # Additional paths to spell check (wildcards supported)
+    },
+
+    # options defined in .pytool/Plugin/UncrustifyCheck
+    "UncrustifyCheck": {
+        "IgnoreFiles": [
+            "opensslconf.h",
+            "dso_conf.h",
+            "opensslconf_generated.h",
+        ]
     }
 }
-- 
2.31.1.windows.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH V2 2/5] CryptoPkg: Separate auto-generated openssl config and edk2 openssl config
  2022-05-10  4:40 ` [PATCH V2 2/5] CryptoPkg: Separate auto-generated openssl config and edk2 openssl config yi1 li
@ 2022-05-10 10:49   ` Gerd Hoffmann
  2022-05-10 11:43     ` [edk2-devel] " yi1 li
  0 siblings, 1 reply; 10+ messages in thread
From: Gerd Hoffmann @ 2022-05-10 10:49 UTC (permalink / raw)
  To: Yi Li; +Cc: devel, Jiewen Yao, Jian J Wang, Xiaoyu Lu, Guomin Jiang

On Tue, May 10, 2022 at 12:40:13PM +0800, Yi Li wrote:
> Move auto-generated openssl config to opensslconf_generated.h,
>  And opensslconf.h will contain both edk2 conditional openssl
>  feature and opensslconf_generated.h.
> Will make two part more clear.
> New conditional feture code in opensslconf.h will look like:
> 
> /* Autogenerated conditional openssl feature list starts here */
> [.....]
> /* Autogenerated conditional openssl feature list ends here */

Why generate opensslconf.h at all?  I think the content doesn't depend
on the openssl submodule sources, so there is no good reason to take the
extra indirection and write it with process_files.pl.  Just commit it ;)

take care,
  Gerd


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [edk2-devel] [PATCH V2 2/5] CryptoPkg: Separate auto-generated openssl config and edk2 openssl config
  2022-05-10 10:49   ` Gerd Hoffmann
@ 2022-05-10 11:43     ` yi1 li
  2022-05-11  7:18       ` Gerd Hoffmann
  0 siblings, 1 reply; 10+ messages in thread
From: yi1 li @ 2022-05-10 11:43 UTC (permalink / raw)
  To: devel@edk2.groups.io, kraxel@redhat.com
  Cc: Yao, Jiewen, Wang, Jian J, Lu, Xiaoyu1, Jiang, Guomin

Just for convenience.
There are too many places need to configure, so I think putting all the configuration options close together, all in process_file.pl, will be more clear to user ;)

Thank you,
Yi 


-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Gerd Hoffmann
Sent: Tuesday, May 10, 2022 6:50 PM
To: Li, Yi1 <yi1.li@intel.com>
Cc: devel@edk2.groups.io; Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Lu, Xiaoyu1 <xiaoyu1.lu@intel.com>; Jiang, Guomin <guomin.jiang@intel.com>
Subject: Re: [edk2-devel] [PATCH V2 2/5] CryptoPkg: Separate auto-generated openssl config and edk2 openssl config

On Tue, May 10, 2022 at 12:40:13PM +0800, Yi Li wrote:
> Move auto-generated openssl config to opensslconf_generated.h,  And 
> opensslconf.h will contain both edk2 conditional openssl  feature and 
> opensslconf_generated.h.
> Will make two part more clear.
> New conditional feture code in opensslconf.h will look like:
> 
> /* Autogenerated conditional openssl feature list starts here */ 
> [.....]
> /* Autogenerated conditional openssl feature list ends here */

Why generate opensslconf.h at all?  I think the content doesn't depend on the openssl submodule sources, so there is no good reason to take the extra indirection and write it with process_files.pl.  Just commit it ;)

take care,
  Gerd







^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [edk2-devel] [PATCH V2 2/5] CryptoPkg: Separate auto-generated openssl config and edk2 openssl config
  2022-05-10 11:43     ` [edk2-devel] " yi1 li
@ 2022-05-11  7:18       ` Gerd Hoffmann
  2022-05-11  7:37         ` yi1 li
  0 siblings, 1 reply; 10+ messages in thread
From: Gerd Hoffmann @ 2022-05-11  7:18 UTC (permalink / raw)
  To: Li, Yi1
  Cc: devel@edk2.groups.io, Yao, Jiewen, Wang, Jian J, Lu, Xiaoyu1,
	Jiang, Guomin

On Tue, May 10, 2022 at 11:43:54AM +0000, Li, Yi1 wrote:
> Just for convenience.
> There are too many places need to configure, so I think putting all the configuration options close together, all in process_file.pl, will be more clear to user ;)

Well, I find it confusing to let process_file.pl write a file which
doesn't change ...

take care,
  Gerd


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [edk2-devel] [PATCH V2 2/5] CryptoPkg: Separate auto-generated openssl config and edk2 openssl config
  2022-05-11  7:18       ` Gerd Hoffmann
@ 2022-05-11  7:37         ` yi1 li
  0 siblings, 0 replies; 10+ messages in thread
From: yi1 li @ 2022-05-11  7:37 UTC (permalink / raw)
  To: devel@edk2.groups.io, kraxel@redhat.com
  Cc: Yao, Jiewen, Wang, Jian J, Lu, Xiaoyu1, Jiang, Guomin

It will change it. For example if we want to make SM2 conditional also, we can change config list to:
my %conditional_feature = ("PcdOpensslEcEnabled"=>["EC", "ECDH", "ECDSA", "TLS1_3"], "PcdOpensslSM2Enabled=>["SM2"]);
my %conditional_feature_dir = ("/ec/"=>"PcdOpensslEcEnabled", "/sm2/"=>"PcdOpensslSM2Enabled");
It will add the relevant define to opensslconf.h and INF files without manual addition.
Better ideas are also welcome.


-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Gerd Hoffmann
Sent: Wednesday, May 11, 2022 3:18 PM
To: Li, Yi1 <yi1.li@intel.com>
Cc: devel@edk2.groups.io; Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Lu, Xiaoyu1 <xiaoyu1.lu@intel.com>; Jiang, Guomin <guomin.jiang@intel.com>
Subject: Re: [edk2-devel] [PATCH V2 2/5] CryptoPkg: Separate auto-generated openssl config and edk2 openssl config

On Tue, May 10, 2022 at 11:43:54AM +0000, Li, Yi1 wrote:
> Just for convenience.
> There are too many places need to configure, so I think putting all 
> the configuration options close together, all in process_file.pl, will 
> be more clear to user ;)

Well, I find it confusing to let process_file.pl write a file which doesn't change ...

take care,
  Gerd







^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-05-11  7:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-10  4:40 [PATCH V2 0/5] CryptoPkg/openssl: Enable EC conditionally yi1 li
2022-05-10  4:40 ` [PATCH V2 1/5] CryptoPkg: Rename PCD about openssl EC configuration yi1 li
2022-05-10  4:40 ` [PATCH V2 2/5] CryptoPkg: Separate auto-generated openssl config and edk2 openssl config yi1 li
2022-05-10 10:49   ` Gerd Hoffmann
2022-05-10 11:43     ` [edk2-devel] " yi1 li
2022-05-11  7:18       ` Gerd Hoffmann
2022-05-11  7:37         ` yi1 li
2022-05-10  4:40 ` [PATCH V2 3/5] CryptoPkg: Update process_files.pl to automatically add PCD config option yi1 li
2022-05-10  4:40 ` [PATCH V2 4/5] CryptoPkg/openssl: update generated files yi1 li
2022-05-10  4:40 ` [PATCH V2 5/5] CryptoPkg/openssl: disable codestyle checks for " yi1 li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox