* [Patch V3] OpensslLib: Missing local header files in [Sources] section of .INFs @ 2019-05-21 21:12 Christian Rodriguez 2019-05-22 9:40 ` [edk2-devel] " Xiaoyu Lu 2019-06-06 20:00 ` Christian Rodriguez 0 siblings, 2 replies; 5+ messages in thread From: Christian Rodriguez @ 2019-05-21 21:12 UTC (permalink / raw) To: devel; +Cc: Jian Wang, Ting Ye, Yonghong Zhu BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1821 In V2: Remove opensslconf.h because it is a script generated header. Update OpenSSL autogeneration script for .INFs because some OpenSSL local headers are missing from [Sources] section of OpensslLib.inf and OpensslLibCrypto.inf. Update OpensslLib.inf and OpensslLibCrypto.inf using the updated script. Enforce compilance of Edk2 INF Spec 3.9, which states, All HII Unicode format files must be listed in [Sources] section. Not functional issue, just compilance. Signed-off-by: Christian Rodriguez <christian.rodriguez@intel.com> Cc: Jian Wang <jian.j.wang@intel.com> Cc: Ting Ye <ting.ye@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> --- CryptoPkg/Library/OpensslLib/OpensslLib.inf | 173 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 167 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ CryptoPkg/Library/OpensslLib/process_files.pl | 50 ++++++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 388 insertions(+), 2 deletions(-) diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.inf b/CryptoPkg/Library/OpensslLib/OpensslLib.inf index 530ac5f110..c24289d353 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf @@ -513,6 +513,179 @@ $(OPENSSL_PATH)/ssl/t1_reneg.c $(OPENSSL_PATH)/ssl/t1_trce.c $(OPENSSL_PATH)/ssl/tls_srp.c + buildinf.h + $(OPENSSL_PATH)/include/internal/asn1t.h + $(OPENSSL_PATH)/include/internal/bio.h + $(OPENSSL_PATH)/include/internal/comp.h + $(OPENSSL_PATH)/include/internal/conf.h + $(OPENSSL_PATH)/include/internal/constant_time_locl.h + $(OPENSSL_PATH)/include/internal/dane.h + $(OPENSSL_PATH)/include/internal/dso.h + $(OPENSSL_PATH)/include/internal/err.h + $(OPENSSL_PATH)/include/internal/numbers.h + $(OPENSSL_PATH)/include/internal/o_dir.h + $(OPENSSL_PATH)/include/internal/o_str.h + $(OPENSSL_PATH)/include/internal/sslconf.h + $(OPENSSL_PATH)/include/internal/thread_once.h + $(OPENSSL_PATH)/include/openssl/aes.h + $(OPENSSL_PATH)/include/openssl/asn1.h + $(OPENSSL_PATH)/include/openssl/asn1t.h + $(OPENSSL_PATH)/include/openssl/asn1_mac.h + $(OPENSSL_PATH)/include/openssl/async.h + $(OPENSSL_PATH)/include/openssl/bio.h + $(OPENSSL_PATH)/include/openssl/blowfish.h + $(OPENSSL_PATH)/include/openssl/bn.h + $(OPENSSL_PATH)/include/openssl/buffer.h + $(OPENSSL_PATH)/include/openssl/camellia.h + $(OPENSSL_PATH)/include/openssl/cast.h + $(OPENSSL_PATH)/include/openssl/cmac.h + $(OPENSSL_PATH)/include/openssl/cms.h + $(OPENSSL_PATH)/include/openssl/comp.h + $(OPENSSL_PATH)/include/openssl/conf.h + $(OPENSSL_PATH)/include/openssl/conf_api.h + $(OPENSSL_PATH)/include/openssl/crypto.h + $(OPENSSL_PATH)/include/openssl/ct.h + $(OPENSSL_PATH)/include/openssl/des.h + $(OPENSSL_PATH)/include/openssl/dh.h + $(OPENSSL_PATH)/include/openssl/dsa.h + $(OPENSSL_PATH)/include/openssl/dtls1.h + $(OPENSSL_PATH)/include/openssl/ebcdic.h + $(OPENSSL_PATH)/include/openssl/ec.h + $(OPENSSL_PATH)/include/openssl/ecdh.h + $(OPENSSL_PATH)/include/openssl/ecdsa.h + $(OPENSSL_PATH)/include/openssl/engine.h + $(OPENSSL_PATH)/include/openssl/err.h + $(OPENSSL_PATH)/include/openssl/evp.h + $(OPENSSL_PATH)/include/openssl/e_os2.h + $(OPENSSL_PATH)/include/openssl/hmac.h + $(OPENSSL_PATH)/include/openssl/idea.h + $(OPENSSL_PATH)/include/openssl/kdf.h + $(OPENSSL_PATH)/include/openssl/lhash.h + $(OPENSSL_PATH)/include/openssl/md2.h + $(OPENSSL_PATH)/include/openssl/md4.h + $(OPENSSL_PATH)/include/openssl/md5.h + $(OPENSSL_PATH)/include/openssl/mdc2.h + $(OPENSSL_PATH)/include/openssl/modes.h + $(OPENSSL_PATH)/include/openssl/objects.h + $(OPENSSL_PATH)/include/openssl/obj_mac.h + $(OPENSSL_PATH)/include/openssl/ocsp.h + $(OPENSSL_PATH)/include/openssl/opensslv.h + $(OPENSSL_PATH)/include/openssl/ossl_typ.h + $(OPENSSL_PATH)/include/openssl/pem.h + $(OPENSSL_PATH)/include/openssl/pem2.h + $(OPENSSL_PATH)/include/openssl/pkcs12.h + $(OPENSSL_PATH)/include/openssl/pkcs7.h + $(OPENSSL_PATH)/include/openssl/rand.h + $(OPENSSL_PATH)/include/openssl/rc2.h + $(OPENSSL_PATH)/include/openssl/rc4.h + $(OPENSSL_PATH)/include/openssl/rc5.h + $(OPENSSL_PATH)/include/openssl/ripemd.h + $(OPENSSL_PATH)/include/openssl/rsa.h + $(OPENSSL_PATH)/include/openssl/safestack.h + $(OPENSSL_PATH)/include/openssl/seed.h + $(OPENSSL_PATH)/include/openssl/sha.h + $(OPENSSL_PATH)/include/openssl/srp.h + $(OPENSSL_PATH)/include/openssl/srtp.h + $(OPENSSL_PATH)/include/openssl/ssl.h + $(OPENSSL_PATH)/include/openssl/ssl2.h + $(OPENSSL_PATH)/include/openssl/ssl3.h + $(OPENSSL_PATH)/include/openssl/stack.h + $(OPENSSL_PATH)/include/openssl/symhacks.h + $(OPENSSL_PATH)/include/openssl/tls1.h + $(OPENSSL_PATH)/include/openssl/ts.h + $(OPENSSL_PATH)/include/openssl/txt_db.h + $(OPENSSL_PATH)/include/openssl/ui.h + $(OPENSSL_PATH)/include/openssl/whrlpool.h + $(OPENSSL_PATH)/include/openssl/x509.h + $(OPENSSL_PATH)/include/openssl/x509v3.h + $(OPENSSL_PATH)/include/openssl/x509_vfy.h + $(OPENSSL_PATH)/crypto/aes/aes_locl.h + $(OPENSSL_PATH)/crypto/arm_arch.h + $(OPENSSL_PATH)/crypto/asn1/asn1_locl.h + $(OPENSSL_PATH)/crypto/asn1/charmap.h + $(OPENSSL_PATH)/crypto/async/arch/async_null.h + $(OPENSSL_PATH)/crypto/async/arch/async_posix.h + $(OPENSSL_PATH)/crypto/async/arch/async_win.h + $(OPENSSL_PATH)/crypto/async/async_locl.h + $(OPENSSL_PATH)/crypto/bf/bf_locl.h + $(OPENSSL_PATH)/crypto/bf/bf_pi.h + $(OPENSSL_PATH)/crypto/bio/bio_lcl.h + $(OPENSSL_PATH)/crypto/blake2/blake2_impl.h + $(OPENSSL_PATH)/crypto/blake2/blake2_locl.h + $(OPENSSL_PATH)/crypto/bn/bn_lcl.h + $(OPENSSL_PATH)/crypto/bn/bn_prime.h + $(OPENSSL_PATH)/crypto/bn/rsaz_exp.h + $(OPENSSL_PATH)/crypto/camellia/cmll_locl.h + $(OPENSSL_PATH)/crypto/cast/cast_lcl.h + $(OPENSSL_PATH)/crypto/cast/cast_s.h + $(OPENSSL_PATH)/crypto/cms/cms_lcl.h + $(OPENSSL_PATH)/crypto/comp/comp_lcl.h + $(OPENSSL_PATH)/crypto/conf/conf_def.h + $(OPENSSL_PATH)/crypto/conf/conf_lcl.h + $(OPENSSL_PATH)/crypto/ct/ct_locl.h + $(OPENSSL_PATH)/crypto/des/des_locl.h + $(OPENSSL_PATH)/crypto/des/rpc_des.h + $(OPENSSL_PATH)/crypto/des/spr.h + $(OPENSSL_PATH)/crypto/dh/dh_locl.h + $(OPENSSL_PATH)/crypto/dsa/dsa_locl.h + $(OPENSSL_PATH)/crypto/dso/dso_locl.h + $(OPENSSL_PATH)/crypto/ec/ec_lcl.h + $(OPENSSL_PATH)/crypto/engine/eng_int.h + $(OPENSSL_PATH)/crypto/evp/evp_locl.h + $(OPENSSL_PATH)/crypto/hmac/hmac_lcl.h + $(OPENSSL_PATH)/crypto/idea/idea_lcl.h + $(OPENSSL_PATH)/crypto/include/internal/asn1_int.h + $(OPENSSL_PATH)/crypto/include/internal/async.h + $(OPENSSL_PATH)/crypto/include/internal/bn_dh.h + $(OPENSSL_PATH)/crypto/include/internal/bn_int.h + $(OPENSSL_PATH)/crypto/include/internal/bn_srp.h + $(OPENSSL_PATH)/crypto/include/internal/chacha.h + $(OPENSSL_PATH)/crypto/include/internal/cryptlib.h + $(OPENSSL_PATH)/crypto/include/internal/cryptlib_int.h + $(OPENSSL_PATH)/crypto/include/internal/engine.h + $(OPENSSL_PATH)/crypto/include/internal/err_int.h + $(OPENSSL_PATH)/crypto/include/internal/evp_int.h + $(OPENSSL_PATH)/crypto/include/internal/lhash.h + $(OPENSSL_PATH)/crypto/include/internal/md32_common.h + $(OPENSSL_PATH)/crypto/include/internal/objects.h + $(OPENSSL_PATH)/crypto/include/internal/poly1305.h + $(OPENSSL_PATH)/crypto/include/internal/rand.h + $(OPENSSL_PATH)/crypto/include/internal/x509_int.h + $(OPENSSL_PATH)/crypto/lhash/lhash_lcl.h + $(OPENSSL_PATH)/crypto/md4/md4_locl.h + $(OPENSSL_PATH)/crypto/md5/md5_locl.h + $(OPENSSL_PATH)/crypto/modes/modes_lcl.h + $(OPENSSL_PATH)/crypto/objects/obj_dat.h + $(OPENSSL_PATH)/crypto/objects/obj_lcl.h + $(OPENSSL_PATH)/crypto/objects/obj_xref.h + $(OPENSSL_PATH)/crypto/ocsp/ocsp_lcl.h + $(OPENSSL_PATH)/crypto/pkcs12/p12_lcl.h + $(OPENSSL_PATH)/crypto/ppc_arch.h + $(OPENSSL_PATH)/crypto/rand/rand_lcl.h + $(OPENSSL_PATH)/crypto/rc2/rc2_locl.h + $(OPENSSL_PATH)/crypto/rc4/rc4_locl.h + $(OPENSSL_PATH)/crypto/rc5/rc5_locl.h + $(OPENSSL_PATH)/crypto/ripemd/rmdconst.h + $(OPENSSL_PATH)/crypto/ripemd/rmd_locl.h + $(OPENSSL_PATH)/crypto/rsa/rsa_locl.h + $(OPENSSL_PATH)/crypto/seed/seed_locl.h + $(OPENSSL_PATH)/crypto/sha/sha_locl.h + $(OPENSSL_PATH)/crypto/sparc_arch.h + $(OPENSSL_PATH)/crypto/ts/ts_lcl.h + $(OPENSSL_PATH)/crypto/ui/ui_locl.h + $(OPENSSL_PATH)/crypto/vms_rms.h + $(OPENSSL_PATH)/crypto/whrlpool/wp_locl.h + $(OPENSSL_PATH)/crypto/x509/x509_lcl.h + $(OPENSSL_PATH)/crypto/x509v3/ext_dat.h + $(OPENSSL_PATH)/crypto/x509v3/pcy_int.h + $(OPENSSL_PATH)/ms/tlhelp32.h + $(OPENSSL_PATH)/ms/uplink.h + $(OPENSSL_PATH)/ssl/packet_locl.h + $(OPENSSL_PATH)/ssl/record/record.h + $(OPENSSL_PATH)/ssl/record/record_locl.h + $(OPENSSL_PATH)/ssl/ssl_locl.h + $(OPENSSL_PATH)/ssl/statem/statem.h + $(OPENSSL_PATH)/ssl/statem/statem_locl.h # Autogenerated files list ends here [Packages] diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf index 2310100988..1347e832cb 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf @@ -474,6 +474,173 @@ $(OPENSSL_PATH)/crypto/x509v3/v3_tlsf.c $(OPENSSL_PATH)/crypto/x509v3/v3_utl.c $(OPENSSL_PATH)/crypto/x509v3/v3err.c + buildinf.h + $(OPENSSL_PATH)/include/internal/asn1t.h + $(OPENSSL_PATH)/include/internal/bio.h + $(OPENSSL_PATH)/include/internal/comp.h + $(OPENSSL_PATH)/include/internal/conf.h + $(OPENSSL_PATH)/include/internal/constant_time_locl.h + $(OPENSSL_PATH)/include/internal/dane.h + $(OPENSSL_PATH)/include/internal/dso.h + $(OPENSSL_PATH)/include/internal/err.h + $(OPENSSL_PATH)/include/internal/numbers.h + $(OPENSSL_PATH)/include/internal/o_dir.h + $(OPENSSL_PATH)/include/internal/o_str.h + $(OPENSSL_PATH)/include/internal/sslconf.h + $(OPENSSL_PATH)/include/internal/thread_once.h + $(OPENSSL_PATH)/include/openssl/aes.h + $(OPENSSL_PATH)/include/openssl/asn1.h + $(OPENSSL_PATH)/include/openssl/asn1t.h + $(OPENSSL_PATH)/include/openssl/asn1_mac.h + $(OPENSSL_PATH)/include/openssl/async.h + $(OPENSSL_PATH)/include/openssl/bio.h + $(OPENSSL_PATH)/include/openssl/blowfish.h + $(OPENSSL_PATH)/include/openssl/bn.h + $(OPENSSL_PATH)/include/openssl/buffer.h + $(OPENSSL_PATH)/include/openssl/camellia.h + $(OPENSSL_PATH)/include/openssl/cast.h + $(OPENSSL_PATH)/include/openssl/cmac.h + $(OPENSSL_PATH)/include/openssl/cms.h + $(OPENSSL_PATH)/include/openssl/comp.h + $(OPENSSL_PATH)/include/openssl/conf.h + $(OPENSSL_PATH)/include/openssl/conf_api.h + $(OPENSSL_PATH)/include/openssl/crypto.h + $(OPENSSL_PATH)/include/openssl/ct.h + $(OPENSSL_PATH)/include/openssl/des.h + $(OPENSSL_PATH)/include/openssl/dh.h + $(OPENSSL_PATH)/include/openssl/dsa.h + $(OPENSSL_PATH)/include/openssl/dtls1.h + $(OPENSSL_PATH)/include/openssl/ebcdic.h + $(OPENSSL_PATH)/include/openssl/ec.h + $(OPENSSL_PATH)/include/openssl/ecdh.h + $(OPENSSL_PATH)/include/openssl/ecdsa.h + $(OPENSSL_PATH)/include/openssl/engine.h + $(OPENSSL_PATH)/include/openssl/err.h + $(OPENSSL_PATH)/include/openssl/evp.h + $(OPENSSL_PATH)/include/openssl/e_os2.h + $(OPENSSL_PATH)/include/openssl/hmac.h + $(OPENSSL_PATH)/include/openssl/idea.h + $(OPENSSL_PATH)/include/openssl/kdf.h + $(OPENSSL_PATH)/include/openssl/lhash.h + $(OPENSSL_PATH)/include/openssl/md2.h + $(OPENSSL_PATH)/include/openssl/md4.h + $(OPENSSL_PATH)/include/openssl/md5.h + $(OPENSSL_PATH)/include/openssl/mdc2.h + $(OPENSSL_PATH)/include/openssl/modes.h + $(OPENSSL_PATH)/include/openssl/objects.h + $(OPENSSL_PATH)/include/openssl/obj_mac.h + $(OPENSSL_PATH)/include/openssl/ocsp.h + $(OPENSSL_PATH)/include/openssl/opensslv.h + $(OPENSSL_PATH)/include/openssl/ossl_typ.h + $(OPENSSL_PATH)/include/openssl/pem.h + $(OPENSSL_PATH)/include/openssl/pem2.h + $(OPENSSL_PATH)/include/openssl/pkcs12.h + $(OPENSSL_PATH)/include/openssl/pkcs7.h + $(OPENSSL_PATH)/include/openssl/rand.h + $(OPENSSL_PATH)/include/openssl/rc2.h + $(OPENSSL_PATH)/include/openssl/rc4.h + $(OPENSSL_PATH)/include/openssl/rc5.h + $(OPENSSL_PATH)/include/openssl/ripemd.h + $(OPENSSL_PATH)/include/openssl/rsa.h + $(OPENSSL_PATH)/include/openssl/safestack.h + $(OPENSSL_PATH)/include/openssl/seed.h + $(OPENSSL_PATH)/include/openssl/sha.h + $(OPENSSL_PATH)/include/openssl/srp.h + $(OPENSSL_PATH)/include/openssl/srtp.h + $(OPENSSL_PATH)/include/openssl/ssl.h + $(OPENSSL_PATH)/include/openssl/ssl2.h + $(OPENSSL_PATH)/include/openssl/ssl3.h + $(OPENSSL_PATH)/include/openssl/stack.h + $(OPENSSL_PATH)/include/openssl/symhacks.h + $(OPENSSL_PATH)/include/openssl/tls1.h + $(OPENSSL_PATH)/include/openssl/ts.h + $(OPENSSL_PATH)/include/openssl/txt_db.h + $(OPENSSL_PATH)/include/openssl/ui.h + $(OPENSSL_PATH)/include/openssl/whrlpool.h + $(OPENSSL_PATH)/include/openssl/x509.h + $(OPENSSL_PATH)/include/openssl/x509v3.h + $(OPENSSL_PATH)/include/openssl/x509_vfy.h + $(OPENSSL_PATH)/crypto/aes/aes_locl.h + $(OPENSSL_PATH)/crypto/arm_arch.h + $(OPENSSL_PATH)/crypto/asn1/asn1_locl.h + $(OPENSSL_PATH)/crypto/asn1/charmap.h + $(OPENSSL_PATH)/crypto/async/arch/async_null.h + $(OPENSSL_PATH)/crypto/async/arch/async_posix.h + $(OPENSSL_PATH)/crypto/async/arch/async_win.h + $(OPENSSL_PATH)/crypto/async/async_locl.h + $(OPENSSL_PATH)/crypto/bf/bf_locl.h + $(OPENSSL_PATH)/crypto/bf/bf_pi.h + $(OPENSSL_PATH)/crypto/bio/bio_lcl.h + $(OPENSSL_PATH)/crypto/blake2/blake2_impl.h + $(OPENSSL_PATH)/crypto/blake2/blake2_locl.h + $(OPENSSL_PATH)/crypto/bn/bn_lcl.h + $(OPENSSL_PATH)/crypto/bn/bn_prime.h + $(OPENSSL_PATH)/crypto/bn/rsaz_exp.h + $(OPENSSL_PATH)/crypto/camellia/cmll_locl.h + $(OPENSSL_PATH)/crypto/cast/cast_lcl.h + $(OPENSSL_PATH)/crypto/cast/cast_s.h + $(OPENSSL_PATH)/crypto/cms/cms_lcl.h + $(OPENSSL_PATH)/crypto/comp/comp_lcl.h + $(OPENSSL_PATH)/crypto/conf/conf_def.h + $(OPENSSL_PATH)/crypto/conf/conf_lcl.h + $(OPENSSL_PATH)/crypto/ct/ct_locl.h + $(OPENSSL_PATH)/crypto/des/des_locl.h + $(OPENSSL_PATH)/crypto/des/rpc_des.h + $(OPENSSL_PATH)/crypto/des/spr.h + $(OPENSSL_PATH)/crypto/dh/dh_locl.h + $(OPENSSL_PATH)/crypto/dsa/dsa_locl.h + $(OPENSSL_PATH)/crypto/dso/dso_locl.h + $(OPENSSL_PATH)/crypto/ec/ec_lcl.h + $(OPENSSL_PATH)/crypto/engine/eng_int.h + $(OPENSSL_PATH)/crypto/evp/evp_locl.h + $(OPENSSL_PATH)/crypto/hmac/hmac_lcl.h + $(OPENSSL_PATH)/crypto/idea/idea_lcl.h + $(OPENSSL_PATH)/crypto/include/internal/asn1_int.h + $(OPENSSL_PATH)/crypto/include/internal/async.h + $(OPENSSL_PATH)/crypto/include/internal/bn_dh.h + $(OPENSSL_PATH)/crypto/include/internal/bn_int.h + $(OPENSSL_PATH)/crypto/include/internal/bn_srp.h + $(OPENSSL_PATH)/crypto/include/internal/chacha.h + $(OPENSSL_PATH)/crypto/include/internal/cryptlib.h + $(OPENSSL_PATH)/crypto/include/internal/cryptlib_int.h + $(OPENSSL_PATH)/crypto/include/internal/engine.h + $(OPENSSL_PATH)/crypto/include/internal/err_int.h + $(OPENSSL_PATH)/crypto/include/internal/evp_int.h + $(OPENSSL_PATH)/crypto/include/internal/lhash.h + $(OPENSSL_PATH)/crypto/include/internal/md32_common.h + $(OPENSSL_PATH)/crypto/include/internal/objects.h + $(OPENSSL_PATH)/crypto/include/internal/poly1305.h + $(OPENSSL_PATH)/crypto/include/internal/rand.h + $(OPENSSL_PATH)/crypto/include/internal/x509_int.h + $(OPENSSL_PATH)/crypto/lhash/lhash_lcl.h + $(OPENSSL_PATH)/crypto/md4/md4_locl.h + $(OPENSSL_PATH)/crypto/md5/md5_locl.h + $(OPENSSL_PATH)/crypto/modes/modes_lcl.h + $(OPENSSL_PATH)/crypto/objects/obj_dat.h + $(OPENSSL_PATH)/crypto/objects/obj_lcl.h + $(OPENSSL_PATH)/crypto/objects/obj_xref.h + $(OPENSSL_PATH)/crypto/ocsp/ocsp_lcl.h + $(OPENSSL_PATH)/crypto/pkcs12/p12_lcl.h + $(OPENSSL_PATH)/crypto/ppc_arch.h + $(OPENSSL_PATH)/crypto/rand/rand_lcl.h + $(OPENSSL_PATH)/crypto/rc2/rc2_locl.h + $(OPENSSL_PATH)/crypto/rc4/rc4_locl.h + $(OPENSSL_PATH)/crypto/rc5/rc5_locl.h + $(OPENSSL_PATH)/crypto/ripemd/rmdconst.h + $(OPENSSL_PATH)/crypto/ripemd/rmd_locl.h + $(OPENSSL_PATH)/crypto/rsa/rsa_locl.h + $(OPENSSL_PATH)/crypto/seed/seed_locl.h + $(OPENSSL_PATH)/crypto/sha/sha_locl.h + $(OPENSSL_PATH)/crypto/sparc_arch.h + $(OPENSSL_PATH)/crypto/ts/ts_lcl.h + $(OPENSSL_PATH)/crypto/ui/ui_locl.h + $(OPENSSL_PATH)/crypto/vms_rms.h + $(OPENSSL_PATH)/crypto/whrlpool/wp_locl.h + $(OPENSSL_PATH)/crypto/x509/x509_lcl.h + $(OPENSSL_PATH)/crypto/x509v3/ext_dat.h + $(OPENSSL_PATH)/crypto/x509v3/pcy_int.h + $(OPENSSL_PATH)/ms/tlhelp32.h + $(OPENSSL_PATH)/ms/uplink.h # Autogenerated files list ends here [Packages] diff --git a/CryptoPkg/Library/OpensslLib/process_files.pl b/CryptoPkg/Library/OpensslLib/process_files.pl index f6e1f43641..9cad6d3ebd 100755 --- a/CryptoPkg/Library/OpensslLib/process_files.pl +++ b/CryptoPkg/Library/OpensslLib/process_files.pl @@ -115,12 +115,18 @@ BEGIN { # Retrieve file lists from OpenSSL configdata # use configdata qw/%unified_info/; +use Cwd qw(cwd getcwd); +use Cwd; my @cryptofilelist = (); my @sslfilelist = (); +my %includedirset = (); foreach my $product ((@{$unified_info{libraries}}, @{$unified_info{engines}})) { foreach my $o (@{$unified_info{sources}->{$product}}) { + foreach my $inc (@{%{$unified_info{includes}}{$o}}) { + $includedirset{$inc} = 1; + } foreach my $s (@{$unified_info{sources}->{$o}}) { next if ($unified_info{generate}->{$s}); next if $s =~ "crypto/bio/b_print.c"; @@ -133,6 +139,46 @@ foreach my $product ((@{$unified_info{libraries}}, } } +my $fullpathcwd = getcwd . '/' . $OPENSSL_PATH . '/'; +my $cwdpath = getcwd . '/'; +my @sslincludefilelist = (); +my @cryptoincludefilelist = (); +# Current working directory header files +foreach my $file (split (/\n/, `find . -maxdepth 1 -name "*.h"`)) { + # Normalize path + my @filearray = split("$cwdpath", Cwd::realpath($file)); + my $pathstring = $filearray[1]; + my $path = ' ' . $pathstring . "\r\n"; + push @cryptoincludefilelist, $path; +} +# Header files below $OPENSSL_PATH +foreach my $dir (keys %includedirset) { + foreach my $file (split (/\n/, `find $OPENSSL_PATH/$dir/ -name "*.h"`)) { + # Normalize path + my @filearray = split("$fullpathcwd", Cwd::realpath($file)); + my $pathstring = $filearray[1]; + my $path = ' $(OPENSSL_PATH)/' . $pathstring . "\r\n"; + # Don't reuse duplicates + next if ( $path ~~ @cryptoincludefilelist ); + next if ( $path ~~ @sslincludefilelist ); + # Ignore these types + next if ( $path =~ "test" ); + next if ( $path =~ "apps" ); + next if ( $path =~ "engines" ); + next if ( $path =~ "fuzz" ); + next if ( $path =~ "os-dep" ); + next if ( $path =~ "e_os.h" ); + next if ( $path =~ "opensslconf.h"); + # Seperate Ssl only headers + if ( $path =~ "/ssl/" ) { + push @sslincludefilelist, $path; + next; + } + push @cryptoincludefilelist, $path; + } +} + + # # Update OpensslLib.inf with autogenerated file list # @@ -141,7 +187,7 @@ my $subbing = 0; print "\n--> Updating OpensslLib.inf ... "; foreach (@inf) { if ( $_ =~ "# Autogenerated files list starts here" ) { - push @new_inf, $_, @cryptofilelist, @sslfilelist; + push @new_inf, $_, @cryptofilelist, @sslfilelist, @cryptoincludefilelist, @sslincludefilelist; $subbing = 1; next; } @@ -184,7 +230,7 @@ $subbing = 0; print "\n--> Updating OpensslLibCrypto.inf ... "; foreach (@inf) { if ( $_ =~ "# Autogenerated files list starts here" ) { - push @new_inf, $_, @cryptofilelist; + push @new_inf, $_, @cryptofilelist, @cryptoincludefilelist; $subbing = 1; next; } -- 2.19.1.windows.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [Patch V3] OpensslLib: Missing local header files in [Sources] section of .INFs 2019-05-21 21:12 [Patch V3] OpensslLib: Missing local header files in [Sources] section of .INFs Christian Rodriguez @ 2019-05-22 9:40 ` Xiaoyu Lu 2019-05-22 9:49 ` Laszlo Ersek 2019-06-06 20:00 ` Christian Rodriguez 1 sibling, 1 reply; 5+ messages in thread From: Xiaoyu Lu @ 2019-05-22 9:40 UTC (permalink / raw) To: devel@edk2.groups.io, Rodriguez, Christian Cc: Wang, Jian J, Ye, Ting, Zhu, Yonghong Hi Christian, (1) We use OpenSSL configure script disabled some OpenSSL feature. But I saw you include all .h files from OpenSSL(only excluded some). Even some header files we don't need (In openssl/crypto/). Can you rule them out? I found OpenSSl use configdata.pm to store configure result. use configdata qw/%config/; foreach my $enabledcryptomodule (@{config{"%sdirs"}}) } Is it possible? If this is difficult, then I have no problem. (2) see blow. (3) I think it's better to separate this patch into two. Patch1. process_files.pl Patch2. OpensslLib[Crypto].conf > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > Christian Rodriguez > Sent: Wednesday, May 22, 2019 5:12 AM > To: devel@edk2.groups.io > Cc: Wang, Jian J <jian.j.wang@intel.com>; Ye, Ting <ting.ye@intel.com>; Zhu, > Yonghong <yonghong.zhu@intel.com> > Subject: [edk2-devel] [Patch V3] OpensslLib: Missing local header files in > [Sources] section of .INFs > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1821 > > In V2: Remove opensslconf.h because it is a script generated header. > Update OpenSSL autogeneration script for .INFs because some > OpenSSL local headers are missing from [Sources] section of > OpensslLib.inf and OpensslLibCrypto.inf. Update OpensslLib.inf and > OpensslLibCrypto.inf using the updated script. Enforce compilance > of Edk2 INF Spec 3.9, which states, All HII Unicode format files > must be listed in [Sources] section. Not functional issue, just compilance. > > Signed-off-by: Christian Rodriguez <christian.rodriguez@intel.com> > Cc: Jian Wang <jian.j.wang@intel.com> > Cc: Ting Ye <ting.ye@intel.com> > Cc: Yonghong Zhu <yonghong.zhu@intel.com> > --- > CryptoPkg/Library/OpensslLib/OpensslLib.inf | 173 > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > +++++++++++++++++++++++++++++++++++++++++++++++++++++++ > CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 167 > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > +++++++++++++++++++++++++++++++++++++++++++++++++ > CryptoPkg/Library/OpensslLib/process_files.pl | 50 > ++++++++++++++++++++++++++++++++++++++++++++++++-- > 3 files changed, 388 insertions(+), 2 deletions(-) > > diff --git a/CryptoPkg/Library/OpensslLib/process_files.pl > b/CryptoPkg/Library/OpensslLib/process_files.pl > index f6e1f43641..9cad6d3ebd 100755 > --- a/CryptoPkg/Library/OpensslLib/process_files.pl > +++ b/CryptoPkg/Library/OpensslLib/process_files.pl > @@ -115,12 +115,18 @@ BEGIN { > # Retrieve file lists from OpenSSL configdata > # > use configdata qw/%unified_info/; > +use Cwd qw(cwd getcwd); > +use Cwd; > > my @cryptofilelist = (); > my @sslfilelist = (); > +my %includedirset = (); > foreach my $product ((@{$unified_info{libraries}}, > @{$unified_info{engines}})) { > foreach my $o (@{$unified_info{sources}->{$product}}) { > + foreach my $inc (@{%{$unified_info{includes}}{$o}}) { > + $includedirset{$inc} = 1; > + } > foreach my $s (@{$unified_info{sources}->{$o}}) { > next if ($unified_info{generate}->{$s}); > next if $s =~ "crypto/bio/b_print.c"; > @@ -133,6 +139,46 @@ foreach my $product ((@{$unified_info{libraries}}, > } > } > > +my $fullpathcwd = getcwd . '/' . $OPENSSL_PATH . '/'; > +my $cwdpath = getcwd . '/'; > +my @sslincludefilelist = (); > +my @cryptoincludefilelist = (); > +# Current working directory header files > +foreach my $file (split (/\n/, `find . -maxdepth 1 -name "*.h"`)) { > + # Normalize path > + my @filearray = split("$cwdpath", Cwd::realpath($file)); > + my $pathstring = $filearray[1]; > + my $path = ' ' . $pathstring . "\r\n"; > + push @cryptoincludefilelist, $path; > +} > +# Header files below $OPENSSL_PATH > +foreach my $dir (keys %includedirset) { (2) If run process_files.pl twice, it possible generate different *.inf files(*.h files is disordered). "keys %includedirset" is disordered. I don't know whether this is a problem. > + foreach my $file (split (/\n/, `find $OPENSSL_PATH/$dir/ -name > "*.h"`)) { > + # Normalize path > + my @filearray = split("$fullpathcwd", Cwd::realpath($file)); > + my $pathstring = $filearray[1]; > + my $path = ' $(OPENSSL_PATH)/' . $pathstring . "\r\n"; > + # Don't reuse duplicates > + next if ( $path ~~ @cryptoincludefilelist ); > + next if ( $path ~~ @sslincludefilelist ); > + # Ignore these types > + next if ( $path =~ "test" ); > + next if ( $path =~ "apps" ); > + next if ( $path =~ "engines" ); > + next if ( $path =~ "fuzz" ); > + next if ( $path =~ "os-dep" ); > + next if ( $path =~ "e_os.h" ); > + next if ( $path =~ "opensslconf.h"); > + # Seperate Ssl only headers > + if ( $path =~ "/ssl/" ) { > + push @sslincludefilelist, $path; > + next; > + } > + push @cryptoincludefilelist, $path; > + } > +} > + > + > # > # Update OpensslLib.inf with autogenerated file list > # > @@ -141,7 +187,7 @@ my $subbing = 0; > print "\n--> Updating OpensslLib.inf ... "; > foreach (@inf) { > if ( $_ =~ "# Autogenerated files list starts here" ) { > - push @new_inf, $_, @cryptofilelist, @sslfilelist; > + push @new_inf, $_, @cryptofilelist, @sslfilelist, > @cryptoincludefilelist, @sslincludefilelist; > $subbing = 1; > next; > } > @@ -184,7 +230,7 @@ $subbing = 0; > print "\n--> Updating OpensslLibCrypto.inf ... "; > foreach (@inf) { > if ( $_ =~ "# Autogenerated files list starts here" ) { > - push @new_inf, $_, @cryptofilelist; > + push @new_inf, $_, @cryptofilelist, @cryptoincludefilelist; > $subbing = 1; > next; > } > -- > 2.19.1.windows.1 > > > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [Patch V3] OpensslLib: Missing local header files in [Sources] section of .INFs 2019-05-22 9:40 ` [edk2-devel] " Xiaoyu Lu @ 2019-05-22 9:49 ` Laszlo Ersek 2019-05-22 14:14 ` Christian Rodriguez 0 siblings, 1 reply; 5+ messages in thread From: Laszlo Ersek @ 2019-05-22 9:49 UTC (permalink / raw) To: devel, xiaoyux.lu, Rodriguez, Christian Cc: Wang, Jian J, Ye, Ting, Zhu, Yonghong On 05/22/19 11:40, Xiaoyu Lu wrote: > Hi Christian, > > (1) We use OpenSSL configure script disabled some OpenSSL feature. > But I saw you include all .h files from OpenSSL(only excluded some). > Even some header files we don't need (In openssl/crypto/). > Can you rule them out? > I found OpenSSl use configdata.pm to store configure result. > > use configdata qw/%config/; > foreach my $enabledcryptomodule (@{config{"%sdirs"}}) > } > > Is it possible? If this is difficult, then I have no problem. > > (2) see blow. > > (3) I think it's better to separate this patch into two. > Patch1. process_files.pl > Patch2. OpensslLib[Crypto].conf > >> -----Original Message----- >> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of >> Christian Rodriguez >> Sent: Wednesday, May 22, 2019 5:12 AM >> To: devel@edk2.groups.io >> Cc: Wang, Jian J <jian.j.wang@intel.com>; Ye, Ting <ting.ye@intel.com>; Zhu, >> Yonghong <yonghong.zhu@intel.com> >> Subject: [edk2-devel] [Patch V3] OpensslLib: Missing local header files in >> [Sources] section of .INFs >> >> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1821 >> >> In V2: Remove opensslconf.h because it is a script generated header. >> Update OpenSSL autogeneration script for .INFs because some >> OpenSSL local headers are missing from [Sources] section of >> OpensslLib.inf and OpensslLibCrypto.inf. Update OpensslLib.inf and >> OpensslLibCrypto.inf using the updated script. Enforce compilance >> of Edk2 INF Spec 3.9, which states, All HII Unicode format files >> must be listed in [Sources] section. Not functional issue, just compilance. >> >> Signed-off-by: Christian Rodriguez <christian.rodriguez@intel.com> >> Cc: Jian Wang <jian.j.wang@intel.com> >> Cc: Ting Ye <ting.ye@intel.com> >> Cc: Yonghong Zhu <yonghong.zhu@intel.com> >> --- >> CryptoPkg/Library/OpensslLib/OpensslLib.inf | 173 >> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ >> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ >> +++++++++++++++++++++++++++++++++++++++++++++++++++++++ >> CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 167 >> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ >> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ >> +++++++++++++++++++++++++++++++++++++++++++++++++ >> CryptoPkg/Library/OpensslLib/process_files.pl | 50 >> ++++++++++++++++++++++++++++++++++++++++++++++++-- >> 3 files changed, 388 insertions(+), 2 deletions(-) >> >> diff --git a/CryptoPkg/Library/OpensslLib/process_files.pl >> b/CryptoPkg/Library/OpensslLib/process_files.pl >> index f6e1f43641..9cad6d3ebd 100755 >> --- a/CryptoPkg/Library/OpensslLib/process_files.pl >> +++ b/CryptoPkg/Library/OpensslLib/process_files.pl >> @@ -115,12 +115,18 @@ BEGIN { >> # Retrieve file lists from OpenSSL configdata >> # >> use configdata qw/%unified_info/; >> +use Cwd qw(cwd getcwd); >> +use Cwd; >> >> my @cryptofilelist = (); >> my @sslfilelist = (); >> +my %includedirset = (); >> foreach my $product ((@{$unified_info{libraries}}, >> @{$unified_info{engines}})) { >> foreach my $o (@{$unified_info{sources}->{$product}}) { >> + foreach my $inc (@{%{$unified_info{includes}}{$o}}) { >> + $includedirset{$inc} = 1; >> + } >> foreach my $s (@{$unified_info{sources}->{$o}}) { >> next if ($unified_info{generate}->{$s}); >> next if $s =~ "crypto/bio/b_print.c"; >> @@ -133,6 +139,46 @@ foreach my $product ((@{$unified_info{libraries}}, >> } >> } >> >> +my $fullpathcwd = getcwd . '/' . $OPENSSL_PATH . '/'; >> +my $cwdpath = getcwd . '/'; >> +my @sslincludefilelist = (); >> +my @cryptoincludefilelist = (); >> +# Current working directory header files >> +foreach my $file (split (/\n/, `find . -maxdepth 1 -name "*.h"`)) { >> + # Normalize path >> + my @filearray = split("$cwdpath", Cwd::realpath($file)); >> + my $pathstring = $filearray[1]; >> + my $path = ' ' . $pathstring . "\r\n"; >> + push @cryptoincludefilelist, $path; >> +} >> +# Header files below $OPENSSL_PATH >> +foreach my $dir (keys %includedirset) { > > (2) If run process_files.pl twice, it possible generate different *.inf > files(*.h files is disordered). "keys %includedirset" is disordered. > I don't know whether this is a problem. Sounds like a good point to me -- in particular if the current file list generation for the INF files is "stable", then it should stay so even if we generate more files for those sources sections. Thanks, Laszlo > >> + foreach my $file (split (/\n/, `find $OPENSSL_PATH/$dir/ -name >> "*.h"`)) { >> + # Normalize path >> + my @filearray = split("$fullpathcwd", Cwd::realpath($file)); >> + my $pathstring = $filearray[1]; >> + my $path = ' $(OPENSSL_PATH)/' . $pathstring . "\r\n"; >> + # Don't reuse duplicates >> + next if ( $path ~~ @cryptoincludefilelist ); >> + next if ( $path ~~ @sslincludefilelist ); >> + # Ignore these types >> + next if ( $path =~ "test" ); >> + next if ( $path =~ "apps" ); >> + next if ( $path =~ "engines" ); >> + next if ( $path =~ "fuzz" ); >> + next if ( $path =~ "os-dep" ); >> + next if ( $path =~ "e_os.h" ); >> + next if ( $path =~ "opensslconf.h"); >> + # Seperate Ssl only headers >> + if ( $path =~ "/ssl/" ) { >> + push @sslincludefilelist, $path; >> + next; >> + } >> + push @cryptoincludefilelist, $path; >> + } >> +} >> + >> + >> # >> # Update OpensslLib.inf with autogenerated file list >> # >> @@ -141,7 +187,7 @@ my $subbing = 0; >> print "\n--> Updating OpensslLib.inf ... "; >> foreach (@inf) { >> if ( $_ =~ "# Autogenerated files list starts here" ) { >> - push @new_inf, $_, @cryptofilelist, @sslfilelist; >> + push @new_inf, $_, @cryptofilelist, @sslfilelist, >> @cryptoincludefilelist, @sslincludefilelist; >> $subbing = 1; >> next; >> } >> @@ -184,7 +230,7 @@ $subbing = 0; >> print "\n--> Updating OpensslLibCrypto.inf ... "; >> foreach (@inf) { >> if ( $_ =~ "# Autogenerated files list starts here" ) { >> - push @new_inf, $_, @cryptofilelist; >> + push @new_inf, $_, @cryptofilelist, @cryptoincludefilelist; >> $subbing = 1; >> next; >> } >> -- >> 2.19.1.windows.1 >> >> >> > > > > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [Patch V3] OpensslLib: Missing local header files in [Sources] section of .INFs 2019-05-22 9:49 ` Laszlo Ersek @ 2019-05-22 14:14 ` Christian Rodriguez 0 siblings, 0 replies; 5+ messages in thread From: Christian Rodriguez @ 2019-05-22 14:14 UTC (permalink / raw) To: devel@edk2.groups.io, lersek@redhat.com, Lu, XiaoyuX Cc: Wang, Jian J, Ye, Ting, Zhu, Yonghong Thanks for the feedback. I will move it forward into the next patch. I also agree with Laszlo's comment on the first patch: " I'd request that we please hold this patch for now. (Comments in disagreement are welcome of course.) If we agree, I'd suggest marking TianoCore#1821 dependent on TianoCore#1089". Both due to the soft feature freeze and the OpenSSL update. Thanks, Christian >-----Original Message----- >From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of >Laszlo Ersek >Sent: Wednesday, May 22, 2019 2:50 AM >To: devel@edk2.groups.io; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Rodriguez, >Christian <christian.rodriguez@intel.com> >Cc: Wang, Jian J <jian.j.wang@intel.com>; Ye, Ting <ting.ye@intel.com>; Zhu, >Yonghong <yonghong.zhu@intel.com> >Subject: Re: [edk2-devel] [Patch V3] OpensslLib: Missing local header files in >[Sources] section of .INFs > >On 05/22/19 11:40, Xiaoyu Lu wrote: >> Hi Christian, >> >> (1) We use OpenSSL configure script disabled some OpenSSL feature. >> But I saw you include all .h files from OpenSSL(only excluded some). >> Even some header files we don't need (In openssl/crypto/). >> Can you rule them out? >> I found OpenSSl use configdata.pm to store configure result. >> >> use configdata qw/%config/; >> foreach my $enabledcryptomodule (@{config{"%sdirs"}}) >> } >> >> Is it possible? If this is difficult, then I have no problem. >> >> (2) see blow. >> >> (3) I think it's better to separate this patch into two. >> Patch1. process_files.pl >> Patch2. OpensslLib[Crypto].conf >> >>> -----Original Message----- >>> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of >>> Christian Rodriguez >>> Sent: Wednesday, May 22, 2019 5:12 AM >>> To: devel@edk2.groups.io >>> Cc: Wang, Jian J <jian.j.wang@intel.com>; Ye, Ting >>> <ting.ye@intel.com>; Zhu, Yonghong <yonghong.zhu@intel.com> >>> Subject: [edk2-devel] [Patch V3] OpensslLib: Missing local header >>> files in [Sources] section of .INFs >>> >>> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1821 >>> >>> In V2: Remove opensslconf.h because it is a script generated header. >>> Update OpenSSL autogeneration script for .INFs because some OpenSSL >>> local headers are missing from [Sources] section of OpensslLib.inf >>> and OpensslLibCrypto.inf. Update OpensslLib.inf and >>> OpensslLibCrypto.inf using the updated script. Enforce compilance of >>> Edk2 INF Spec 3.9, which states, All HII Unicode format files must be >>> listed in [Sources] section. Not functional issue, just compilance. >>> >>> Signed-off-by: Christian Rodriguez <christian.rodriguez@intel.com> >>> Cc: Jian Wang <jian.j.wang@intel.com> >>> Cc: Ting Ye <ting.ye@intel.com> >>> Cc: Yonghong Zhu <yonghong.zhu@intel.com> >>> --- >>> CryptoPkg/Library/OpensslLib/OpensslLib.inf | 173 >>> >+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ >>> >+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ >>> +++++++++++++++++++++++++++++++++++++++++++++++++++++++ >>> CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 167 >>> >+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ >>> >+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ >>> +++++++++++++++++++++++++++++++++++++++++++++++++ >>> CryptoPkg/Library/OpensslLib/process_files.pl | 50 >>> ++++++++++++++++++++++++++++++++++++++++++++++++-- >>> 3 files changed, 388 insertions(+), 2 deletions(-) >>> >>> diff --git a/CryptoPkg/Library/OpensslLib/process_files.pl >>> b/CryptoPkg/Library/OpensslLib/process_files.pl >>> index f6e1f43641..9cad6d3ebd 100755 >>> --- a/CryptoPkg/Library/OpensslLib/process_files.pl >>> +++ b/CryptoPkg/Library/OpensslLib/process_files.pl >>> @@ -115,12 +115,18 @@ BEGIN { >>> # Retrieve file lists from OpenSSL configdata # use configdata >>> qw/%unified_info/; >>> +use Cwd qw(cwd getcwd); >>> +use Cwd; >>> >>> my @cryptofilelist = (); >>> my @sslfilelist = (); >>> +my %includedirset = (); >>> foreach my $product ((@{$unified_info{libraries}}, >>> @{$unified_info{engines}})) { >>> foreach my $o (@{$unified_info{sources}->{$product}}) { >>> + foreach my $inc (@{%{$unified_info{includes}}{$o}}) { >>> + $includedirset{$inc} = 1; >>> + } >>> foreach my $s (@{$unified_info{sources}->{$o}}) { >>> next if ($unified_info{generate}->{$s}); >>> next if $s =~ "crypto/bio/b_print.c"; @@ -133,6 +139,46 >>> @@ foreach my $product ((@{$unified_info{libraries}}, >>> } >>> } >>> >>> +my $fullpathcwd = getcwd . '/' . $OPENSSL_PATH . '/'; my $cwdpath = >>> +getcwd . '/'; my @sslincludefilelist = (); my @cryptoincludefilelist >>> += (); # Current working directory header files foreach my $file >>> +(split (/\n/, `find . -maxdepth 1 -name "*.h"`)) { >>> + # Normalize path >>> + my @filearray = split("$cwdpath", Cwd::realpath($file)); >>> + my $pathstring = $filearray[1]; >>> + my $path = ' ' . $pathstring . "\r\n"; >>> + push @cryptoincludefilelist, $path; } # Header files below >>> +$OPENSSL_PATH foreach my $dir (keys %includedirset) { >> >> (2) If run process_files.pl twice, it possible generate different *.inf >> files(*.h files is disordered). "keys %includedirset" is disordered. >> I don't know whether this is a problem. > >Sounds like a good point to me -- in particular if the current file list generation >for the INF files is "stable", then it should stay so even if we generate more >files for those sources sections. > >Thanks, >Laszlo > >> >>> + foreach my $file (split (/\n/, `find $OPENSSL_PATH/$dir/ -name >>> "*.h"`)) { >>> + # Normalize path >>> + my @filearray = split("$fullpathcwd", Cwd::realpath($file)); >>> + my $pathstring = $filearray[1]; >>> + my $path = ' $(OPENSSL_PATH)/' . $pathstring . "\r\n"; >>> + # Don't reuse duplicates >>> + next if ( $path ~~ @cryptoincludefilelist ); >>> + next if ( $path ~~ @sslincludefilelist ); >>> + # Ignore these types >>> + next if ( $path =~ "test" ); >>> + next if ( $path =~ "apps" ); >>> + next if ( $path =~ "engines" ); >>> + next if ( $path =~ "fuzz" ); >>> + next if ( $path =~ "os-dep" ); >>> + next if ( $path =~ "e_os.h" ); >>> + next if ( $path =~ "opensslconf.h"); >>> + # Seperate Ssl only headers >>> + if ( $path =~ "/ssl/" ) { >>> + push @sslincludefilelist, $path; >>> + next; >>> + } >>> + push @cryptoincludefilelist, $path; >>> + } >>> +} >>> + >>> + >>> # >>> # Update OpensslLib.inf with autogenerated file list # @@ -141,7 >>> +187,7 @@ my $subbing = 0; print "\n--> Updating OpensslLib.inf ... >>> "; foreach (@inf) { >>> if ( $_ =~ "# Autogenerated files list starts here" ) { >>> - push @new_inf, $_, @cryptofilelist, @sslfilelist; >>> + push @new_inf, $_, @cryptofilelist, @sslfilelist, >>> @cryptoincludefilelist, @sslincludefilelist; >>> $subbing = 1; >>> next; >>> } >>> @@ -184,7 +230,7 @@ $subbing = 0; >>> print "\n--> Updating OpensslLibCrypto.inf ... "; foreach (@inf) { >>> if ( $_ =~ "# Autogenerated files list starts here" ) { >>> - push @new_inf, $_, @cryptofilelist; >>> + push @new_inf, $_, @cryptofilelist, @cryptoincludefilelist; >>> $subbing = 1; >>> next; >>> } >>> -- >>> 2.19.1.windows.1 >>> >>> >>> >> >> >> >> > > > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [Patch V3] OpensslLib: Missing local header files in [Sources] section of .INFs 2019-05-21 21:12 [Patch V3] OpensslLib: Missing local header files in [Sources] section of .INFs Christian Rodriguez 2019-05-22 9:40 ` [edk2-devel] " Xiaoyu Lu @ 2019-06-06 20:00 ` Christian Rodriguez 1 sibling, 0 replies; 5+ messages in thread From: Christian Rodriguez @ 2019-06-06 20:00 UTC (permalink / raw) To: Christian Rodriguez, devel [-- Attachment #1: Type: text/plain, Size: 423 bytes --] Hi Xiaoyu, For your comment (1), I don't see a way to rule out headers using configdata. I was already using configdata to get the include directories, but configdata doesn't list the specific header files that will be used for compilation. We can ignore things with a common name or specific files, but ruling out all of them doesn't seem possible using what is given. The rest of the comments can be addressed. [-- Attachment #2: Type: text/html, Size: 447 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-06-06 20:00 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-05-21 21:12 [Patch V3] OpensslLib: Missing local header files in [Sources] section of .INFs Christian Rodriguez 2019-05-22 9:40 ` [edk2-devel] " Xiaoyu Lu 2019-05-22 9:49 ` Laszlo Ersek 2019-05-22 14:14 ` Christian Rodriguez 2019-06-06 20:00 ` Christian Rodriguez
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox