From: David Woodhouse <david.woodho...@intel.com>

With the patches which are going into upstream OpenSSL, we are able to run
the standard Configure script and import the result into the EDK II source
repository for others to build natively. The opensslconf.h file and the
list of files in OpensslLib.inf don't need to be managed manually.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: David Woodhouse <david.woodho...@intel.com>
---
 CryptoPkg/Library/OpensslLib/OpensslLib.inf   | 377 +-------------------------
 CryptoPkg/Library/OpensslLib/process_files.sh |  38 +++
 2 files changed, 49 insertions(+), 366 deletions(-)
 create mode 100755 CryptoPkg/Library/OpensslLib/process_files.sh

diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.inf 
b/CryptoPkg/Library/OpensslLib/OpensslLib.inf
index 2e74f6c..5ceed69 100644
--- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf
+++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf
@@ -29,6 +29,7 @@
 
 [Sources]
   $(OPENSSL_PATH)/e_os.h
+# Autogenerated files list starts here
   $(OPENSSL_PATH)/crypto/cryptlib.c
   $(OPENSSL_PATH)/crypto/mem.c
   $(OPENSSL_PATH)/crypto/mem_clr.c
@@ -44,66 +45,24 @@
   $(OPENSSL_PATH)/crypto/o_fips.c
   $(OPENSSL_PATH)/crypto/o_init.c
   $(OPENSSL_PATH)/crypto/fips_ers.c
-
-  #
-  # OBJECTS
-  #
   $(OPENSSL_PATH)/crypto/objects/o_names.c
   $(OPENSSL_PATH)/crypto/objects/obj_dat.c
   $(OPENSSL_PATH)/crypto/objects/obj_lib.c
   $(OPENSSL_PATH)/crypto/objects/obj_err.c
   $(OPENSSL_PATH)/crypto/objects/obj_xref.c
-
-  #
-  # MD4
-  #
   $(OPENSSL_PATH)/crypto/md4/md4_dgst.c
   $(OPENSSL_PATH)/crypto/md4/md4_one.c
-
-  #
-  # MD5
-  #
   $(OPENSSL_PATH)/crypto/md5/md5_dgst.c
   $(OPENSSL_PATH)/crypto/md5/md5_one.c
-
-  #
-  # SHA
-  #
   $(OPENSSL_PATH)/crypto/sha/sha_dgst.c
   $(OPENSSL_PATH)/crypto/sha/sha1dgst.c
   $(OPENSSL_PATH)/crypto/sha/sha_one.c
   $(OPENSSL_PATH)/crypto/sha/sha1_one.c
   $(OPENSSL_PATH)/crypto/sha/sha256.c
   $(OPENSSL_PATH)/crypto/sha/sha512.c
-
-  #
-  # MDC2 - Disabled by OPENSSL_NO_MDC2
-  #
-  # $(OPENSSL_PATH)/crypto/mdc2/mdc2dgst.c
-  # $(OPENSSL_PATH)/crypto/mdc2/mdc2_one.c
-
-  #
-  # HMAC
-  #
   $(OPENSSL_PATH)/crypto/hmac/hmac.c
   $(OPENSSL_PATH)/crypto/hmac/hm_ameth.c
   $(OPENSSL_PATH)/crypto/hmac/hm_pmeth.c
-
-  #
-  # RIPEMD - Disabled by OPENSSL_NO_RIPEMD
-  #
-  # $(OPENSSL_PATH)/crypto/ripemd/rmd_dgst.c
-  # $(OPENSSL_PATH)/crypto/ripemd/rmd_one.c
-
-  #
-  # WHIRLPOOL - Disabled by OPENSSL_NO_WHIRLPOOL
-  #
-  # $(OPENSSL_PATH)/crypto/whrlpool/wp_dgst.c
-  # $(OPENSSL_PATH)/crypto/whrlpool/wp_block.c
-
-  #
-  # DES
-  #
   $(OPENSSL_PATH)/crypto/des/cbc_cksm.c
   $(OPENSSL_PATH)/crypto/des/cbc_enc.c
   $(OPENSSL_PATH)/crypto/des/cfb64enc.c
@@ -130,10 +89,6 @@
   $(OPENSSL_PATH)/crypto/des/des_old.c
   $(OPENSSL_PATH)/crypto/des/des_old2.c
   $(OPENSSL_PATH)/crypto/des/read2pwd.c
-
-  #
-  # AES
-  #
   $(OPENSSL_PATH)/crypto/aes/aes_core.c
   $(OPENSSL_PATH)/crypto/aes/aes_misc.c
   $(OPENSSL_PATH)/crypto/aes/aes_ecb.c
@@ -143,83 +98,9 @@
   $(OPENSSL_PATH)/crypto/aes/aes_ctr.c
   $(OPENSSL_PATH)/crypto/aes/aes_ige.c
   $(OPENSSL_PATH)/crypto/aes/aes_wrap.c
-
-  #
-  # RC2 - Disabled by OPENSSL_NO_RC2
-  #
-  # $(OPENSSL_PATH)/crypto/rc2/rc2_ecb.c
-  # $(OPENSSL_PATH)/crypto/rc2/rc2_skey.c
-  # $(OPENSSL_PATH)/crypto/rc2/rc2_cbc.c
-  # $(OPENSSL_PATH)/crypto/rc2/rc2cfb64.c
-  # $(OPENSSL_PATH)/crypto/rc2/rc2ofb64.c
-
-  #
-  # RC4
-  #
   $(OPENSSL_PATH)/crypto/rc4/rc4_skey.c
   $(OPENSSL_PATH)/crypto/rc4/rc4_enc.c
   $(OPENSSL_PATH)/crypto/rc4/rc4_utl.c
-
-  #
-  # RC5 - Disabled by OPENSSL_NO_RC5
-  #
-  # $(OPENSSL_PATH)/crypto/rc5/rc5_skey.c
-  # $(OPENSSL_PATH)/crypto/rc5/rc5_ecb.c
-  # $(OPENSSL_PATH)/crypto/rc5/rc5_enc.c
-  # $(OPENSSL_PATH)/crypto/rc5/rc5cfb64.c
-  # $(OPENSSL_PATH)/crypto/rc5/rc5ofb64.c
-
-  #
-  # IDEA - Disabled by OPENSSL_NO_IDEA
-  #
-  # $(OPENSSL_PATH)/crypto/idea/i_cbc.c
-  # $(OPENSSL_PATH)/crypto/idea/i_cfb64.c
-  # $(OPENSSL_PATH)/crypto/idea/i_ofb64.c
-  # $(OPENSSL_PATH)/crypto/idea/i_ecb.c
-  # $(OPENSSL_PATH)/crypto/idea/i_skey.c
-
-  #
-  # BLOWFISH - Disabled by OPENSSL_NO_BF
-  #
-  # $(OPENSSL_PATH)/crypto/bf/bf_skey.c
-  # $(OPENSSL_PATH)/crypto/bf/bf_ecb.c
-  # $(OPENSSL_PATH)/crypto/bf/bf_enc.c
-  # $(OPENSSL_PATH)/crypto/bf/bf_cfb64.c
-  # $(OPENSSL_PATH)/crypto/bf/bf_ofb64.c
-
-  #
-  # CAST - Disabled by OPENSSL_NO_CAST
-  #
-  # $(OPENSSL_PATH)/crypto/cast/c_skey.c
-  # $(OPENSSL_PATH)/crypto/cast/c_ecb.c
-  # $(OPENSSL_PATH)/crypto/cast/c_enc.c
-  # $(OPENSSL_PATH)/crypto/cast/c_cfb64.c
-  # $(OPENSSL_PATH)/crypto/cast/c_ofb64.c
-
-  #
-  # CAMELLIA - Disabled by OPENSSL_NO_CAMELLIA
-  #
-  # $(OPENSSL_PATH)/crypto/camellia/camellia.c
-  # $(OPENSSL_PATH)/crypto/camellia/cmll_misc.c
-  # $(OPENSSL_PATH)/crypto/camellia/cmll_ecb.c
-  # $(OPENSSL_PATH)/crypto/camellia/cmll_cbc.c
-  # $(OPENSSL_PATH)/crypto/camellia/cmll_ofb.c
-  # $(OPENSSL_PATH)/crypto/camellia/cmll_cfb.c
-  # $(OPENSSL_PATH)/crypto/camellia/cmll_ctr.c
-  # $(OPENSSL_PATH)/crypto/camellia/cmll_utl.c
-
-  #
-  # SEED - Disabled by OPENSSL_NO_SEED
-  #
-  # $(OPENSSL_PATH)/crypto/seed/seed.c
-  # $(OPENSSL_PATH)/crypto/seed/seed_ecb.c
-  # $(OPENSSL_PATH)/crypto/seed/seed_cbc.c
-  # $(OPENSSL_PATH)/crypto/seed/seed_cfb.c
-  # $(OPENSSL_PATH)/crypto/seed/seed_ofb.c
-
-  #
-  # MODES
-  #
   $(OPENSSL_PATH)/crypto/modes/cbc128.c
   $(OPENSSL_PATH)/crypto/modes/ctr128.c
   $(OPENSSL_PATH)/crypto/modes/cts128.c
@@ -229,10 +110,6 @@
   $(OPENSSL_PATH)/crypto/modes/ccm128.c
   $(OPENSSL_PATH)/crypto/modes/xts128.c
   $(OPENSSL_PATH)/crypto/modes/wrap128.c
-
-  #
-  # BIGNUM
-  #
   $(OPENSSL_PATH)/crypto/bn/bn_add.c
   $(OPENSSL_PATH)/crypto/bn/bn_div.c
   $(OPENSSL_PATH)/crypto/bn/bn_exp.c
@@ -261,38 +138,6 @@
   $(OPENSSL_PATH)/crypto/bn/bn_depr.c
   $(OPENSSL_PATH)/crypto/bn/bn_const.c
   $(OPENSSL_PATH)/crypto/bn/bn_x931p.c
-
-  #
-  # ELLIPTIC CURVE - Disabled by OPENSSL_NO_EC
-  #
-  # $(OPENSSL_PATH)/crypto/ec/ec_lib.c
-  # $(OPENSSL_PATH)/crypto/ec/ecp_smpl.c
-  # $(OPENSSL_PATH)/crypto/ec/ecp_mont.c
-  # $(OPENSSL_PATH)/crypto/ec/ecp_nist.c
-  # $(OPENSSL_PATH)/crypto/ec/ec_cvt.c
-  # $(OPENSSL_PATH)/crypto/ec/ec_mult.c
-  # $(OPENSSL_PATH)/crypto/ec/ec_err.c
-  # $(OPENSSL_PATH)/crypto/ec/ec_curve.c
-  # $(OPENSSL_PATH)/crypto/ec/ec_check.c
-  # $(OPENSSL_PATH)/crypto/ec/ec_print.c
-  # $(OPENSSL_PATH)/crypto/ec/ec_asn1.c
-  # $(OPENSSL_PATH)/crypto/ec/ec_key.c
-  # $(OPENSSL_PATH)/crypto/ec/ec2_smpl.c
-  # $(OPENSSL_PATH)/crypto/ec/ec2_mult.c
-  # $(OPENSSL_PATH)/crypto/ec/ec_ameth.c
-  # $(OPENSSL_PATH)/crypto/ec/ec_pmeth.c
-  # $(OPENSSL_PATH)/crypto/ec/eck_prn.c
-  # $(OPENSSL_PATH)/crypto/ec/ecp_nistp224.c
-  # $(OPENSSL_PATH)/crypto/ec/ecp_nistp256.c
-  # $(OPENSSL_PATH)/crypto/ec/ecp_nistp521.c
-  # $(OPENSSL_PATH)/crypto/ec/ecp_nistputil.c
-  # $(OPENSSL_PATH)/crypto/ec/ecp_oct.c
-  # $(OPENSSL_PATH)/crypto/ec/ec2_oct.c
-  # $(OPENSSL_PATH)/crypto/ec/ec_oct.c
-
-  #
-  # RSA
-  #
   $(OPENSSL_PATH)/crypto/rsa/rsa_eay.c
   $(OPENSSL_PATH)/crypto/rsa/rsa_gen.c
   $(OPENSSL_PATH)/crypto/rsa/rsa_lib.c
@@ -313,36 +158,6 @@
   $(OPENSSL_PATH)/crypto/rsa/rsa_prn.c
   $(OPENSSL_PATH)/crypto/rsa/rsa_pmeth.c
   $(OPENSSL_PATH)/crypto/rsa/rsa_crpt.c
-
-  #
-  # DSA - Disabled by OPENSSL_NO_DSA
-  #
-  # $(OPENSSL_PATH)/crypto/dsa/dsa_gen.c
-  # $(OPENSSL_PATH)/crypto/dsa/dsa_key.c
-  # $(OPENSSL_PATH)/crypto/dsa/dsa_lib.c
-  # $(OPENSSL_PATH)/crypto/dsa/dsa_asn1.c
-  # $(OPENSSL_PATH)/crypto/dsa/dsa_vrf.c
-  # $(OPENSSL_PATH)/crypto/dsa/dsa_sign.c
-  # $(OPENSSL_PATH)/crypto/dsa/dsa_err.c
-  # $(OPENSSL_PATH)/crypto/dsa/dsa_ossl.c
-  # $(OPENSSL_PATH)/crypto/dsa/dsa_depr.c
-  # $(OPENSSL_PATH)/crypto/dsa/dsa_ameth.c
-  # $(OPENSSL_PATH)/crypto/dsa/dsa_pmeth.c
-  # $(OPENSSL_PATH)/crypto/dsa/dsa_prn.c
-
-  #
-  # ECDSA - Disabled by OPENSSL_NO_ECDSA
-  #
-  # $(OPENSSL_PATH)/crypto/ecdsa/ecs_lib.c
-  # $(OPENSSL_PATH)/crypto/ecdsa/ecs_asn1.c
-  # $(OPENSSL_PATH)/crypto/ecdsa/ecs_ossl.c
-  # $(OPENSSL_PATH)/crypto/ecdsa/ecs_sign.c
-  # $(OPENSSL_PATH)/crypto/ecdsa/ecs_vrf.c
-  # $(OPENSSL_PATH)/crypto/ecdsa/ecs_err.c
-
-  #
-  # DIFFIE-HELLMAN
-  #
   $(OPENSSL_PATH)/crypto/dh/dh_asn1.c
   $(OPENSSL_PATH)/crypto/dh/dh_gen.c
   $(OPENSSL_PATH)/crypto/dh/dh_key.c
@@ -354,20 +169,7 @@
   $(OPENSSL_PATH)/crypto/dh/dh_pmeth.c
   $(OPENSSL_PATH)/crypto/dh/dh_prn.c
   $(OPENSSL_PATH)/crypto/dh/dh_rfc5114.c
-  # $(OPENSSL_PATH)/crypto/dh/dh_kdf.c
-
-  #
-  # ECDH - Disabled by OPENSSL_NO_ECDH
-  #
-  # $(OPENSSL_PATH)/crypto/ecdh/ech_lib.c
-  # $(OPENSSL_PATH)/crypto/ecdh/ech_ossl.c
-  # $(OPENSSL_PATH)/crypto/ecdh/ech_key.c
-  # $(OPENSSL_PATH)/crypto/ecdh/ech_err.c
-  # $(OPENSSL_PATH)/crypto/ecdh/ech_kdf.c
-
-  #
-  # DSO
-  #
+  $(OPENSSL_PATH)/crypto/dh/dh_kdf.c
   $(OPENSSL_PATH)/crypto/dso/dso_dl.c
   $(OPENSSL_PATH)/crypto/dso/dso_dlfcn.c
   $(OPENSSL_PATH)/crypto/dso/dso_err.c
@@ -377,46 +179,9 @@
   $(OPENSSL_PATH)/crypto/dso/dso_win32.c
   $(OPENSSL_PATH)/crypto/dso/dso_vms.c
   $(OPENSSL_PATH)/crypto/dso/dso_beos.c
-
-  #
-  # ENGINE - Disabled by OPENSSL_NO_ENGINE
-  #
-  # $(OPENSSL_PATH)/crypto/engine/eng_err.c
-  # $(OPENSSL_PATH)/crypto/engine/eng_lib.c
-  # $(OPENSSL_PATH)/crypto/engine/eng_list.c
-  # $(OPENSSL_PATH)/crypto/engine/eng_init.c
-  # $(OPENSSL_PATH)/crypto/engine/eng_ctrl.c
-  # $(OPENSSL_PATH)/crypto/engine/eng_table.c
-  # $(OPENSSL_PATH)/crypto/engine/eng_pkey.c
-  # $(OPENSSL_PATH)/crypto/engine/eng_fat.c
-  # $(OPENSSL_PATH)/crypto/engine/eng_all.c
-  # $(OPENSSL_PATH)/crypto/engine/tb_rsa.c
-  # $(OPENSSL_PATH)/crypto/engine/tb_dsa.c
-  # $(OPENSSL_PATH)/crypto/engine/tb_ecdsa.c
-  # $(OPENSSL_PATH)/crypto/engine/tb_dh.c
-  # $(OPENSSL_PATH)/crypto/engine/tb_ecdh.c
-  # $(OPENSSL_PATH)/crypto/engine/tb_rand.c
-  # $(OPENSSL_PATH)/crypto/engine/tb_store.c
-  # $(OPENSSL_PATH)/crypto/engine/tb_cipher.c
-  # $(OPENSSL_PATH)/crypto/engine/tb_digest.c
-  # $(OPENSSL_PATH)/crypto/engine/tb_pkmeth.c
-  # $(OPENSSL_PATH)/crypto/engine/tb_asnmth.c
-  # $(OPENSSL_PATH)/crypto/engine/eng_openssl.c
-  # $(OPENSSL_PATH)/crypto/engine/eng_cnf.c
-  # $(OPENSSL_PATH)/crypto/engine/eng_dyn.c
-  # $(OPENSSL_PATH)/crypto/engine/eng_cryptodev.c
-  # $(OPENSSL_PATH)/crypto/engine/eng_rdrand.c
-
-  #
-  # BUFFER
-  #
   $(OPENSSL_PATH)/crypto/buffer/buffer.c
   $(OPENSSL_PATH)/crypto/buffer/buf_str.c
   $(OPENSSL_PATH)/crypto/buffer/buf_err.c
-
-  #
-  # BIO
-  #
   $(OPENSSL_PATH)/crypto/bio/bio_lib.c
   $(OPENSSL_PATH)/crypto/bio/bio_cb.c
   $(OPENSSL_PATH)/crypto/bio/bio_err.c
@@ -428,10 +193,6 @@
   $(OPENSSL_PATH)/crypto/bio/bss_conn.c
   $(OPENSSL_PATH)/crypto/bio/bf_null.c
   $(OPENSSL_PATH)/crypto/bio/bf_buff.c
-  #
-  # Not Required by UEFI.
-  #
-  # $(OPENSSL_PATH)/crypto/bio/b_print.c
   $(OPENSSL_PATH)/crypto/bio/b_dump.c
   $(OPENSSL_PATH)/crypto/bio/b_sock.c
   $(OPENSSL_PATH)/crypto/bio/bss_acpt.c
@@ -439,41 +200,21 @@
   $(OPENSSL_PATH)/crypto/bio/bss_log.c
   $(OPENSSL_PATH)/crypto/bio/bss_bio.c
   $(OPENSSL_PATH)/crypto/bio/bss_dgram.c
-
-  #
-  # STACK
-  #
   $(OPENSSL_PATH)/crypto/stack/stack.c
-
-  #
-  # LHASH
-  #
   $(OPENSSL_PATH)/crypto/lhash/lhash.c
   $(OPENSSL_PATH)/crypto/lhash/lh_stats.c
-
-  #
-  # RAND
-  #
   $(OPENSSL_PATH)/crypto/rand/md_rand.c
   $(OPENSSL_PATH)/crypto/rand/randfile.c
   $(OPENSSL_PATH)/crypto/rand/rand_lib.c
   $(OPENSSL_PATH)/crypto/rand/rand_err.c
-  # $(OPENSSL_PATH)/crypto/rand/rand_egd.c
-  # $(OPENSSL_PATH)/crypto/rand/rand_win.c
+  $(OPENSSL_PATH)/crypto/rand/rand_egd.c
+  $(OPENSSL_PATH)/crypto/rand/rand_win.c
   $(OPENSSL_PATH)/crypto/rand/rand_unix.c
-  # $(OPENSSL_PATH)/crypto/rand/rand_os2.c
-  # $(OPENSSL_PATH)/crypto/rand/rand_nw.c
-
-  #
-  # ERR
-  #
+  $(OPENSSL_PATH)/crypto/rand/rand_os2.c
+  $(OPENSSL_PATH)/crypto/rand/rand_nw.c
   $(OPENSSL_PATH)/crypto/err/err.c
   $(OPENSSL_PATH)/crypto/err/err_all.c
   $(OPENSSL_PATH)/crypto/err/err_prn.c
-
-  #
-  # EVP
-  #
   $(OPENSSL_PATH)/crypto/evp/encode.c
   $(OPENSSL_PATH)/crypto/evp/digest.c
   $(OPENSSL_PATH)/crypto/evp/evp_enc.c
@@ -534,10 +275,6 @@
   $(OPENSSL_PATH)/crypto/evp/e_aes_cbc_hmac_sha1.c
   $(OPENSSL_PATH)/crypto/evp/e_aes_cbc_hmac_sha256.c
   $(OPENSSL_PATH)/crypto/evp/e_rc4_hmac_md5.c
-
-  #
-  # ASN1
-  #
   $(OPENSSL_PATH)/crypto/asn1/a_object.c
   $(OPENSSL_PATH)/crypto/asn1/a_bitstr.c
   $(OPENSSL_PATH)/crypto/asn1/a_utctm.c
@@ -615,10 +352,6 @@
   $(OPENSSL_PATH)/crypto/asn1/p5_pbev2.c
   $(OPENSSL_PATH)/crypto/asn1/p8_pkey.c
   $(OPENSSL_PATH)/crypto/asn1/asn_moid.c
-
-  #
-  # PEM
-  #
   $(OPENSSL_PATH)/crypto/pem/pem_sign.c
   $(OPENSSL_PATH)/crypto/pem/pem_seal.c
   $(OPENSSL_PATH)/crypto/pem/pem_info.c
@@ -631,10 +364,6 @@
   $(OPENSSL_PATH)/crypto/pem/pem_pk8.c
   $(OPENSSL_PATH)/crypto/pem/pem_pkey.c
   $(OPENSSL_PATH)/crypto/pem/pvkfmt.c
-
-  #
-  # X509
-  #
   $(OPENSSL_PATH)/crypto/x509/x509_def.c
   $(OPENSSL_PATH)/crypto/x509/x509_d2.c
   $(OPENSSL_PATH)/crypto/x509/x509_r2x.c
@@ -656,16 +385,9 @@
   $(OPENSSL_PATH)/crypto/x509/x_all.c
   $(OPENSSL_PATH)/crypto/x509/x509_txt.c
   $(OPENSSL_PATH)/crypto/x509/x509_trs.c
-  #
-  #  Not Required by UEFI.
-  #
-  # $(OPENSSL_PATH)/crypto/x509/by_file.c
-  # $(OPENSSL_PATH)/crypto/x509/by_dir.c
+  $(OPENSSL_PATH)/crypto/x509/by_file.c
+  $(OPENSSL_PATH)/crypto/x509/by_dir.c
   $(OPENSSL_PATH)/crypto/x509/x509_vpm.c
-
-  #
-  # X509v3
-  #
   $(OPENSSL_PATH)/crypto/x509v3/v3_bcons.c
   $(OPENSSL_PATH)/crypto/x509v3/v3_bitst.c
   $(OPENSSL_PATH)/crypto/x509v3/v3_conf.c
@@ -702,14 +424,7 @@
   $(OPENSSL_PATH)/crypto/x509v3/pcy_lib.c
   $(OPENSSL_PATH)/crypto/x509v3/v3_asid.c
   $(OPENSSL_PATH)/crypto/x509v3/v3_addr.c
-  #
-  #  Not Required by UEFI.
-  #
-  # $(OPENSSL_PATH)/crypto/x509v3/v3_scts.c
-
-  #
-  # CONF
-  #
+  $(OPENSSL_PATH)/crypto/x509v3/v3_scts.c
   $(OPENSSL_PATH)/crypto/conf/conf_err.c
   $(OPENSSL_PATH)/crypto/conf/conf_lib.c
   $(OPENSSL_PATH)/crypto/conf/conf_api.c
@@ -717,15 +432,7 @@
   $(OPENSSL_PATH)/crypto/conf/conf_mod.c
   $(OPENSSL_PATH)/crypto/conf/conf_mall.c
   $(OPENSSL_PATH)/crypto/conf/conf_sap.c
-
-  #
-  # TXT_DB
-  #
   $(OPENSSL_PATH)/crypto/txt_db/txt_db.c
-
-  #
-  # PKCS7
-  #
   $(OPENSSL_PATH)/crypto/pkcs7/pk7_asn1.c
   $(OPENSSL_PATH)/crypto/pkcs7/pk7_lib.c
   $(OPENSSL_PATH)/crypto/pkcs7/pkcs7err.c
@@ -734,10 +441,6 @@
   $(OPENSSL_PATH)/crypto/pkcs7/pk7_attr.c
   $(OPENSSL_PATH)/crypto/pkcs7/pk7_mime.c
   $(OPENSSL_PATH)/crypto/pkcs7/bio_pk7.c
-
-  #
-  # PKCS12
-  #
   $(OPENSSL_PATH)/crypto/pkcs12/p12_add.c
   $(OPENSSL_PATH)/crypto/pkcs12/p12_asn.c
   $(OPENSSL_PATH)/crypto/pkcs12/p12_attr.c
@@ -753,18 +456,10 @@
   $(OPENSSL_PATH)/crypto/pkcs12/pk12err.c
   $(OPENSSL_PATH)/crypto/pkcs12/p12_p8d.c
   $(OPENSSL_PATH)/crypto/pkcs12/p12_p8e.c
-
-  #
-  # COMP
-  #
   $(OPENSSL_PATH)/crypto/comp/comp_lib.c
   $(OPENSSL_PATH)/crypto/comp/comp_err.c
   $(OPENSSL_PATH)/crypto/comp/c_rle.c
   $(OPENSSL_PATH)/crypto/comp/c_zlib.c
-
-  #
-  # OCSP - Disabled by OPENSSL_NO_OCSP
-  #
   $(OPENSSL_PATH)/crypto/ocsp/ocsp_asn.c
   $(OPENSSL_PATH)/crypto/ocsp/ocsp_ext.c
   $(OPENSSL_PATH)/crypto/ocsp/ocsp_ht.c
@@ -774,50 +469,8 @@
   $(OPENSSL_PATH)/crypto/ocsp/ocsp_prn.c
   $(OPENSSL_PATH)/crypto/ocsp/ocsp_vfy.c
   $(OPENSSL_PATH)/crypto/ocsp/ocsp_err.c
-
-  #
-  # UI
-  #
-  $(OPENSSL_PATH)/crypto/ui/ui_lib.c
-  #
-  #  Not Required by UEFI.
-  #
-  # $(OPENSSL_PATH)/crypto/ui/ui_err.c
-  # $(OPENSSL_PATH)/crypto/ui/ui_openssl.c
-  $(OPENSSL_PATH)/crypto/ui/ui_util.c
-  $(OPENSSL_PATH)/crypto/ui/ui_compat.c
-
-  #
-  # KRB5
-  #
   $(OPENSSL_PATH)/crypto/krb5/krb5_asn.c
-
-  #
-  # CMS - Disabled by OPENSSL_NO_CMS
-  #
-  # $(OPENSSL_PATH)/crypto/cms/cms_lib.c
-  # $(OPENSSL_PATH)/crypto/cms/cms_asn1.c
-  # $(OPENSSL_PATH)/crypto/cms/cms_att.c
-  # $(OPENSSL_PATH)/crypto/cms/cms_io.c
-  # $(OPENSSL_PATH)/crypto/cms/cms_smime.c
-  # $(OPENSSL_PATH)/crypto/cms/cms_err.c
-  # $(OPENSSL_PATH)/crypto/cms/cms_sd.c
-  # $(OPENSSL_PATH)/crypto/cms/cms_dd.c
-  # $(OPENSSL_PATH)/crypto/cms/cms_cd.c
-  # $(OPENSSL_PATH)/crypto/cms/cms_env.c
-  # $(OPENSSL_PATH)/crypto/cms/cms_enc.c
-  # $(OPENSSL_PATH)/crypto/cms/cms_ess.c
-  # $(OPENSSL_PATH)/crypto/cms/cms_pwri.c
-  # $(OPENSSL_PATH)/crypto/cms/cms_kari.c
-
-  #
-  # PQUEUE
-  #
   $(OPENSSL_PATH)/crypto/pqueue/pqueue.c
-
-  #
-  # TS
-  #
   $(OPENSSL_PATH)/crypto/ts/ts_err.c
   $(OPENSSL_PATH)/crypto/ts/ts_req_utils.c
   $(OPENSSL_PATH)/crypto/ts/ts_req_print.c
@@ -829,20 +482,12 @@
   $(OPENSSL_PATH)/crypto/ts/ts_lib.c
   $(OPENSSL_PATH)/crypto/ts/ts_conf.c
   $(OPENSSL_PATH)/crypto/ts/ts_asn1.c
-
-  #
-  # SRP - Disabled by OPENSSL_NO_SRP
-  #
-  # $(OPENSSL_PATH)/crypto/srp/srp_lib.c
-  # $(OPENSSL_PATH)/crypto/srp/srp_vfy.c
-
-  #
-  # CMAS
-  #
   $(OPENSSL_PATH)/crypto/cmac/cmac.c
   $(OPENSSL_PATH)/crypto/cmac/cm_ameth.c
   $(OPENSSL_PATH)/crypto/cmac/cm_pmeth.c
 
+# Autogenerated files list ends here
+
 [Packages]
   MdePkg/MdePkg.dec
   CryptoPkg/CryptoPkg.dec
diff --git a/CryptoPkg/Library/OpensslLib/process_files.sh 
b/CryptoPkg/Library/OpensslLib/process_files.sh
new file mode 100755
index 0000000..577ab22
--- /dev/null
+++ b/CryptoPkg/Library/OpensslLib/process_files.sh
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+cd openssl-1.0.2d
+ ./Configure UEFI no-camellia no-seed no-rcs no-mdc2 no-sock no-cms no-jpake 
no-capieng no-err no-krb5 no-dynamic-engine no-stdio no-posix-io no-fp-api 
no-dgram no-asm no-ui no-rc2 no-idea no-bf no-cast no-ec no-ecdh no-ecdsa 
no-srp no-whirlpool no-dsa no-engine no-asm no-ssl no-engines no-sha0 no-hw 
no-locking no-deprecated no-ripemd no-bf no-cast no-dsa no-rfc3779 no-filenames 
no-sct no-scrypt no-threads no-krb5
+make files
+cd -
+
+function filelist ()
+{
+    echo '1,/# Autogenerated files list starts here/p'
+    echo '/# Autogenerated files list ends here/,$p'
+    echo '/# Autogenerated files list starts here/a\'
+
+    while read LINE; do
+       case "$LINE" in
+           RELATIVE_DIRECTORY=*)
+               eval "$LINE"
+               ;;
+           LIBSRC=*)
+               LIBSRC=$(echo "$LINE" | sed s/^LIBSRC=//)
+               if [ "$RELATIVE_DIRECTORY" != "ssl" ]; then
+                   for FILE in $LIBSRC; do
+                       if [ "$FILE" != "b_print.c" ]; then
+                           echo -e '  
$(OPENSSL_PATH)/'$RELATIVE_DIRECTORY/$FILE\\r\\
+                       fi
+                   done
+               fi
+               ;;
+       esac
+    done
+    echo -e \\r
+}
+
+filelist < openssl-1.0.2d/MINFO |  sed -n -f - -i OpensslLib.inf
+
+# We can tell Windows users to put this back manually if they can't run
+# Configure.
+cp openssl-1.0.2d/crypto/opensslconf.h .
-- 
2.4.3

-- 
David Woodhouse                            Open Source Technology Centre
david.woodho...@intel.com                              Intel Corporation

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to