From: "Michael D Kinney" <michael.d.kinney@intel.com>
To: devel@edk2.groups.io
Cc: Yi Li <yi1.li@intel.com>, Jiewen Yao <jiewen.yao@intel.com>,
Jian J Wang <jian.j.wang@intel.com>,
Xiaoyu Lu <xiaoyu1.lu@intel.com>,
Guomin Jiang <guomin.jiang@intel.com>,
Christopher Zurcher <christopher.zurcher@microsoft.com>
Subject: [Patch v2 13/16] Revert "CryptoPkg: Update process_files.pl to auto add PCD config option"
Date: Thu, 20 Oct 2022 11:35:07 -0700 [thread overview]
Message-ID: <20221020183510.1799-14-michael.d.kinney@intel.com> (raw)
In-Reply-To: <20221020183510.1799-1-michael.d.kinney@intel.com>
From: Yi Li <yi1.li@intel.com>
This reverts commit 499b0d5fa57dafe47b260aaf0cea6c6b0286e656.
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: Christopher Zurcher <christopher.zurcher@microsoft.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Yi Li <yi1.li@intel.com>
---
CryptoPkg/Library/OpensslLib/process_files.pl | 77 +------------------
1 file changed, 3 insertions(+), 74 deletions(-)
diff --git a/CryptoPkg/Library/OpensslLib/process_files.pl b/CryptoPkg/Library/OpensslLib/process_files.pl
index 82e5176b3995..7e18c9f52d35 100755
--- a/CryptoPkg/Library/OpensslLib/process_files.pl
+++ b/CryptoPkg/Library/OpensslLib/process_files.pl
@@ -81,19 +81,6 @@ 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";
@@ -307,13 +294,7 @@ foreach my $product ((@{$unified_info{libraries}},
push @sslfilelist, ' $(OPENSSL_PATH)/' . $s . "\r\n";
next;
}
- push @cryptofilelist, ' $(OPENSSL_PATH)/' . $s;
- foreach (keys(%conditional_feature_dir)) {
- if ($s =~ $_) {
- push @cryptofilelist, ' |*|*|*|gEfiCryptoPkgTokenSpaceGuid.' . $conditional_feature_dir{$_};
- }
- }
- push @cryptofilelist, "\r\n";
+ push @cryptofilelist, ' $(OPENSSL_PATH)/' . $s . "\r\n";
}
}
}
@@ -342,13 +323,7 @@ foreach (@headers){
push @sslfilelist, ' $(OPENSSL_PATH)/' . $_ . "\r\n";
next;
}
- 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";
+ push @cryptofilelist, ' $(OPENSSL_PATH)/' . $_ . "\r\n";
}
@@ -453,7 +428,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_generated.h"
+ "> " . $OPENSSL_PATH . "/../../Include/openssl/opensslconf.h"
) == 0 ||
die "Cannot copy opensslconf.h!";
print "Done!";
@@ -465,52 +440,6 @@ 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.37.1.windows.1
next prev parent reply other threads:[~2022-10-20 18:35 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-20 18:34 [Patch v2 00/16] CryptoPkg: Remove EC PCD and merge perf opt OpensslLibs Michael D Kinney
2022-10-20 18:34 ` [Patch v2 01/16] CryptoPkg: Document and disable deprecated crypto services Michael D Kinney
2022-10-20 18:34 ` [Patch v2 02/16] CryptoPkg/Library/BaseCryptLib: Add missing UNI file and fix format Michael D Kinney
2022-10-20 18:34 ` [Patch v2 03/16] CryptoPkg/Library/BaseCryptLib: Update internal functions/variables Michael D Kinney
2022-10-20 18:34 ` [Patch v2 04/16] CryptoPkg/Test/UnitTest/Library/BaseCryptLib: Unit test fixes Michael D Kinney
2022-10-20 18:34 ` [Patch v2 05/16] CryptoPkg/Library: Cleanup BaseCryptLib and TlsLib Michael D Kinney
2022-10-20 18:35 ` [Patch v2 06/16] CryptoPkg/Library/OpensslLib: Combine all performance optimized INFs Michael D Kinney
2022-10-20 18:35 ` [Patch v2 07/16] CryptoPkg/Library/OpensslLib: Produce consistent set of APIs Michael D Kinney
2022-10-20 18:35 ` [Patch v2 08/16] CryptoPkg/Library/OpensslLib: Remove PrintLib from INF files Michael D Kinney
2022-10-20 18:35 ` [Patch v2 09/16] CryptoPkg: Remove PcdOpensslEcEnabled from CryptoPkg.dec Michael D Kinney
2022-10-20 18:35 ` [Patch v2 10/16] CryptoPkg: Update DSC to improve CI test coverage Michael D Kinney
2022-10-20 18:35 ` [Patch v2 11/16] CryptoPkg: Fixed host-based unit tests Michael D Kinney
2022-10-20 18:35 ` [Patch v2 12/16] CryptoPkg: Add Readme.md Michael D Kinney
2022-10-20 18:35 ` Michael D Kinney [this message]
2022-10-20 18:35 ` [Patch v2 14/16] CryptoPkg/Library/OpensslLib: Update process_files.pl INF generation Michael D Kinney
2022-10-20 18:35 ` [Patch v2 15/16] CryptoPkg/Library/OpensslLib: Add generated flag to Accel INF Michael D Kinney
2022-10-20 18:35 ` [Patch v2 16/16] CryptoPkg/Library/OpensslLib: update auto-generated files Michael D Kinney
2022-10-24 3:52 ` [Patch v2 00/16] CryptoPkg: Remove EC PCD and merge perf opt OpensslLibs Yao, Jiewen
[not found] ` <1720E4F0EDFC384F.808@groups.io>
2022-10-24 3:54 ` [edk2-devel] " Yao, Jiewen
2022-10-24 5:43 ` Michael D Kinney
2022-10-24 6:24 ` Yao, Jiewen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221020183510.1799-14-michael.d.kinney@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox