CryptoPkg/OpensslLib: Automatically configure OpenSSL and generate file list
authorQin Long <qin.long@intel.com>
Sat, 5 Mar 2016 15:45:59 +0000 (23:45 +0800)
committerQin Long <qin.long@intel.com>
Sat, 5 Mar 2016 15:45:59 +0000 (23:45 +0800)
OpenSSL 1.1 (as well as our backport to 1.0.2) now allows us to run its
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.Woodhouse@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Qin Long <qin.long@intel.com>
Tested-by: Qin Long <qin.long@intel.com>
CryptoPkg/Library/OpensslLib/OpensslLib.inf
CryptoPkg/Library/OpensslLib/opensslconf.h
CryptoPkg/Library/OpensslLib/process_files.sh [new file with mode: 0644]

index 9b6e860337a538fcedf845370513a4005daf5018..c2a0c0f1161b7d6316550be86458309e8a02ce20 100644 (file)
@@ -29,6 +29,7 @@
 \r
 [Sources]\r
   $(OPENSSL_PATH)/e_os.h\r
+# Autogenerated files list starts here\r
   $(OPENSSL_PATH)/crypto/cryptlib.c\r
   $(OPENSSL_PATH)/crypto/mem.c\r
   $(OPENSSL_PATH)/crypto/mem_clr.c\r
   $(OPENSSL_PATH)/crypto/o_fips.c\r
   $(OPENSSL_PATH)/crypto/o_init.c\r
   $(OPENSSL_PATH)/crypto/fips_ers.c\r
-\r
-  #\r
-  # OBJECTS\r
-  #\r
   $(OPENSSL_PATH)/crypto/objects/o_names.c\r
   $(OPENSSL_PATH)/crypto/objects/obj_dat.c\r
   $(OPENSSL_PATH)/crypto/objects/obj_lib.c\r
   $(OPENSSL_PATH)/crypto/objects/obj_err.c\r
   $(OPENSSL_PATH)/crypto/objects/obj_xref.c\r
-\r
-  #\r
-  # MD4\r
-  #\r
   $(OPENSSL_PATH)/crypto/md4/md4_dgst.c\r
   $(OPENSSL_PATH)/crypto/md4/md4_one.c\r
-\r
-  #\r
-  # MD5\r
-  #\r
   $(OPENSSL_PATH)/crypto/md5/md5_dgst.c\r
   $(OPENSSL_PATH)/crypto/md5/md5_one.c\r
-\r
-  #\r
-  # SHA\r
-  #\r
   $(OPENSSL_PATH)/crypto/sha/sha_dgst.c\r
   $(OPENSSL_PATH)/crypto/sha/sha1dgst.c\r
   $(OPENSSL_PATH)/crypto/sha/sha_one.c\r
   $(OPENSSL_PATH)/crypto/sha/sha1_one.c\r
   $(OPENSSL_PATH)/crypto/sha/sha256.c\r
   $(OPENSSL_PATH)/crypto/sha/sha512.c\r
-\r
-  #\r
-  # MDC2 - Disabled by OPENSSL_NO_MDC2\r
-  #\r
-  # $(OPENSSL_PATH)/crypto/mdc2/mdc2dgst.c\r
-  # $(OPENSSL_PATH)/crypto/mdc2/mdc2_one.c\r
-\r
-  #\r
-  # HMAC\r
-  #\r
   $(OPENSSL_PATH)/crypto/hmac/hmac.c\r
   $(OPENSSL_PATH)/crypto/hmac/hm_ameth.c\r
   $(OPENSSL_PATH)/crypto/hmac/hm_pmeth.c\r
-\r
-  #\r
-  # RIPEMD - Disabled by OPENSSL_NO_RIPEMD\r
-  #\r
-  # $(OPENSSL_PATH)/crypto/ripemd/rmd_dgst.c\r
-  # $(OPENSSL_PATH)/crypto/ripemd/rmd_one.c\r
-\r
-  #\r
-  # WHIRLPOOL - Disabled by OPENSSL_NO_WHIRLPOOL\r
-  #\r
-  # $(OPENSSL_PATH)/crypto/whrlpool/wp_dgst.c\r
-  # $(OPENSSL_PATH)/crypto/whrlpool/wp_block.c\r
-\r
-  #\r
-  # DES\r
-  #\r
   $(OPENSSL_PATH)/crypto/des/cbc_cksm.c\r
   $(OPENSSL_PATH)/crypto/des/cbc_enc.c\r
   $(OPENSSL_PATH)/crypto/des/cfb64enc.c\r
   $(OPENSSL_PATH)/crypto/des/des_old.c\r
   $(OPENSSL_PATH)/crypto/des/des_old2.c\r
   $(OPENSSL_PATH)/crypto/des/read2pwd.c\r
-\r
-  #\r
-  # AES\r
-  #\r
   $(OPENSSL_PATH)/crypto/aes/aes_core.c\r
   $(OPENSSL_PATH)/crypto/aes/aes_misc.c\r
   $(OPENSSL_PATH)/crypto/aes/aes_ecb.c\r
   $(OPENSSL_PATH)/crypto/aes/aes_ctr.c\r
   $(OPENSSL_PATH)/crypto/aes/aes_ige.c\r
   $(OPENSSL_PATH)/crypto/aes/aes_wrap.c\r
-\r
-  #\r
-  # RC2 - Disabled by OPENSSL_NO_RC2\r
-  #\r
-  # $(OPENSSL_PATH)/crypto/rc2/rc2_ecb.c\r
-  # $(OPENSSL_PATH)/crypto/rc2/rc2_skey.c\r
-  # $(OPENSSL_PATH)/crypto/rc2/rc2_cbc.c\r
-  # $(OPENSSL_PATH)/crypto/rc2/rc2cfb64.c\r
-  # $(OPENSSL_PATH)/crypto/rc2/rc2ofb64.c\r
-\r
-  #\r
-  # RC4\r
-  #\r
   $(OPENSSL_PATH)/crypto/rc4/rc4_skey.c\r
   $(OPENSSL_PATH)/crypto/rc4/rc4_enc.c\r
   $(OPENSSL_PATH)/crypto/rc4/rc4_utl.c\r
-\r
-  #\r
-  # RC5 - Disabled by OPENSSL_NO_RC5\r
-  #\r
-  # $(OPENSSL_PATH)/crypto/rc5/rc5_skey.c\r
-  # $(OPENSSL_PATH)/crypto/rc5/rc5_ecb.c\r
-  # $(OPENSSL_PATH)/crypto/rc5/rc5_enc.c\r
-  # $(OPENSSL_PATH)/crypto/rc5/rc5cfb64.c\r
-  # $(OPENSSL_PATH)/crypto/rc5/rc5ofb64.c\r
-\r
-  #\r
-  # IDEA - Disabled by OPENSSL_NO_IDEA\r
-  #\r
-  # $(OPENSSL_PATH)/crypto/idea/i_cbc.c\r
-  # $(OPENSSL_PATH)/crypto/idea/i_cfb64.c\r
-  # $(OPENSSL_PATH)/crypto/idea/i_ofb64.c\r
-  # $(OPENSSL_PATH)/crypto/idea/i_ecb.c\r
-  # $(OPENSSL_PATH)/crypto/idea/i_skey.c\r
-\r
-  #\r
-  # BLOWFISH - Disabled by OPENSSL_NO_BF\r
-  #\r
-  # $(OPENSSL_PATH)/crypto/bf/bf_skey.c\r
-  # $(OPENSSL_PATH)/crypto/bf/bf_ecb.c\r
-  # $(OPENSSL_PATH)/crypto/bf/bf_enc.c\r
-  # $(OPENSSL_PATH)/crypto/bf/bf_cfb64.c\r
-  # $(OPENSSL_PATH)/crypto/bf/bf_ofb64.c\r
-\r
-  #\r
-  # CAST - Disabled by OPENSSL_NO_CAST\r
-  #\r
-  # $(OPENSSL_PATH)/crypto/cast/c_skey.c\r
-  # $(OPENSSL_PATH)/crypto/cast/c_ecb.c\r
-  # $(OPENSSL_PATH)/crypto/cast/c_enc.c\r
-  # $(OPENSSL_PATH)/crypto/cast/c_cfb64.c\r
-  # $(OPENSSL_PATH)/crypto/cast/c_ofb64.c\r
-\r
-  #\r
-  # CAMELLIA - Disabled by OPENSSL_NO_CAMELLIA\r
-  #\r
-  # $(OPENSSL_PATH)/crypto/camellia/camellia.c\r
-  # $(OPENSSL_PATH)/crypto/camellia/cmll_misc.c\r
-  # $(OPENSSL_PATH)/crypto/camellia/cmll_ecb.c\r
-  # $(OPENSSL_PATH)/crypto/camellia/cmll_cbc.c\r
-  # $(OPENSSL_PATH)/crypto/camellia/cmll_ofb.c\r
-  # $(OPENSSL_PATH)/crypto/camellia/cmll_cfb.c\r
-  # $(OPENSSL_PATH)/crypto/camellia/cmll_ctr.c\r
-  # $(OPENSSL_PATH)/crypto/camellia/cmll_utl.c\r
-\r
-  #\r
-  # SEED - Disabled by OPENSSL_NO_SEED\r
-  #\r
-  # $(OPENSSL_PATH)/crypto/seed/seed.c\r
-  # $(OPENSSL_PATH)/crypto/seed/seed_ecb.c\r
-  # $(OPENSSL_PATH)/crypto/seed/seed_cbc.c\r
-  # $(OPENSSL_PATH)/crypto/seed/seed_cfb.c\r
-  # $(OPENSSL_PATH)/crypto/seed/seed_ofb.c\r
-\r
-  #\r
-  # MODES\r
-  #\r
   $(OPENSSL_PATH)/crypto/modes/cbc128.c\r
   $(OPENSSL_PATH)/crypto/modes/ctr128.c\r
   $(OPENSSL_PATH)/crypto/modes/cts128.c\r
   $(OPENSSL_PATH)/crypto/modes/ccm128.c\r
   $(OPENSSL_PATH)/crypto/modes/xts128.c\r
   $(OPENSSL_PATH)/crypto/modes/wrap128.c\r
-\r
-  #\r
-  # BIGNUM\r
-  #\r
   $(OPENSSL_PATH)/crypto/bn/bn_add.c\r
   $(OPENSSL_PATH)/crypto/bn/bn_div.c\r
   $(OPENSSL_PATH)/crypto/bn/bn_exp.c\r
   $(OPENSSL_PATH)/crypto/bn/bn_depr.c\r
   $(OPENSSL_PATH)/crypto/bn/bn_const.c\r
   $(OPENSSL_PATH)/crypto/bn/bn_x931p.c\r
-\r
-  #\r
-  # ELLIPTIC CURVE - Disabled by OPENSSL_NO_EC\r
-  #\r
-  # $(OPENSSL_PATH)/crypto/ec/ec_lib.c\r
-  # $(OPENSSL_PATH)/crypto/ec/ecp_smpl.c\r
-  # $(OPENSSL_PATH)/crypto/ec/ecp_mont.c\r
-  # $(OPENSSL_PATH)/crypto/ec/ecp_nist.c\r
-  # $(OPENSSL_PATH)/crypto/ec/ec_cvt.c\r
-  # $(OPENSSL_PATH)/crypto/ec/ec_mult.c\r
-  # $(OPENSSL_PATH)/crypto/ec/ec_err.c\r
-  # $(OPENSSL_PATH)/crypto/ec/ec_curve.c\r
-  # $(OPENSSL_PATH)/crypto/ec/ec_check.c\r
-  # $(OPENSSL_PATH)/crypto/ec/ec_print.c\r
-  # $(OPENSSL_PATH)/crypto/ec/ec_asn1.c\r
-  # $(OPENSSL_PATH)/crypto/ec/ec_key.c\r
-  # $(OPENSSL_PATH)/crypto/ec/ec2_smpl.c\r
-  # $(OPENSSL_PATH)/crypto/ec/ec2_mult.c\r
-  # $(OPENSSL_PATH)/crypto/ec/ec_ameth.c\r
-  # $(OPENSSL_PATH)/crypto/ec/ec_pmeth.c\r
-  # $(OPENSSL_PATH)/crypto/ec/eck_prn.c\r
-  # $(OPENSSL_PATH)/crypto/ec/ecp_nistp224.c\r
-  # $(OPENSSL_PATH)/crypto/ec/ecp_nistp256.c\r
-  # $(OPENSSL_PATH)/crypto/ec/ecp_nistp521.c\r
-  # $(OPENSSL_PATH)/crypto/ec/ecp_nistputil.c\r
-  # $(OPENSSL_PATH)/crypto/ec/ecp_oct.c\r
-  # $(OPENSSL_PATH)/crypto/ec/ec2_oct.c\r
-  # $(OPENSSL_PATH)/crypto/ec/ec_oct.c\r
-\r
-  #\r
-  # RSA\r
-  #\r
   $(OPENSSL_PATH)/crypto/rsa/rsa_eay.c\r
   $(OPENSSL_PATH)/crypto/rsa/rsa_gen.c\r
   $(OPENSSL_PATH)/crypto/rsa/rsa_lib.c\r
   $(OPENSSL_PATH)/crypto/rsa/rsa_prn.c\r
   $(OPENSSL_PATH)/crypto/rsa/rsa_pmeth.c\r
   $(OPENSSL_PATH)/crypto/rsa/rsa_crpt.c\r
-\r
-  #\r
-  # DSA - Disabled by OPENSSL_NO_DSA\r
-  #\r
-  # $(OPENSSL_PATH)/crypto/dsa/dsa_gen.c\r
-  # $(OPENSSL_PATH)/crypto/dsa/dsa_key.c\r
-  # $(OPENSSL_PATH)/crypto/dsa/dsa_lib.c\r
-  # $(OPENSSL_PATH)/crypto/dsa/dsa_asn1.c\r
-  # $(OPENSSL_PATH)/crypto/dsa/dsa_vrf.c\r
-  # $(OPENSSL_PATH)/crypto/dsa/dsa_sign.c\r
-  # $(OPENSSL_PATH)/crypto/dsa/dsa_err.c\r
-  # $(OPENSSL_PATH)/crypto/dsa/dsa_ossl.c\r
-  # $(OPENSSL_PATH)/crypto/dsa/dsa_depr.c\r
-  # $(OPENSSL_PATH)/crypto/dsa/dsa_ameth.c\r
-  # $(OPENSSL_PATH)/crypto/dsa/dsa_pmeth.c\r
-  # $(OPENSSL_PATH)/crypto/dsa/dsa_prn.c\r
-\r
-  #\r
-  # ECDSA - Disabled by OPENSSL_NO_ECDSA\r
-  #\r
-  # $(OPENSSL_PATH)/crypto/ecdsa/ecs_lib.c\r
-  # $(OPENSSL_PATH)/crypto/ecdsa/ecs_asn1.c\r
-  # $(OPENSSL_PATH)/crypto/ecdsa/ecs_ossl.c\r
-  # $(OPENSSL_PATH)/crypto/ecdsa/ecs_sign.c\r
-  # $(OPENSSL_PATH)/crypto/ecdsa/ecs_vrf.c\r
-  # $(OPENSSL_PATH)/crypto/ecdsa/ecs_err.c\r
-\r
-  #\r
-  # DIFFIE-HELLMAN\r
-  #\r
   $(OPENSSL_PATH)/crypto/dh/dh_asn1.c\r
   $(OPENSSL_PATH)/crypto/dh/dh_gen.c\r
   $(OPENSSL_PATH)/crypto/dh/dh_key.c\r
   $(OPENSSL_PATH)/crypto/dh/dh_pmeth.c\r
   $(OPENSSL_PATH)/crypto/dh/dh_prn.c\r
   $(OPENSSL_PATH)/crypto/dh/dh_rfc5114.c\r
-  # $(OPENSSL_PATH)/crypto/dh/dh_kdf.c\r
-\r
-  #\r
-  # ECDH - Disabled by OPENSSL_NO_ECDH\r
-  #\r
-  # $(OPENSSL_PATH)/crypto/ecdh/ech_lib.c\r
-  # $(OPENSSL_PATH)/crypto/ecdh/ech_ossl.c\r
-  # $(OPENSSL_PATH)/crypto/ecdh/ech_key.c\r
-  # $(OPENSSL_PATH)/crypto/ecdh/ech_err.c\r
-  # $(OPENSSL_PATH)/crypto/ecdh/ech_kdf.c\r
-\r
-  #\r
-  # DSO\r
-  #\r
+  $(OPENSSL_PATH)/crypto/dh/dh_kdf.c\r
   $(OPENSSL_PATH)/crypto/dso/dso_dl.c\r
   $(OPENSSL_PATH)/crypto/dso/dso_dlfcn.c\r
   $(OPENSSL_PATH)/crypto/dso/dso_err.c\r
   $(OPENSSL_PATH)/crypto/dso/dso_win32.c\r
   $(OPENSSL_PATH)/crypto/dso/dso_vms.c\r
   $(OPENSSL_PATH)/crypto/dso/dso_beos.c\r
-\r
-  #\r
-  # ENGINE - Disabled by OPENSSL_NO_ENGINE\r
-  #\r
-  # $(OPENSSL_PATH)/crypto/engine/eng_err.c\r
-  # $(OPENSSL_PATH)/crypto/engine/eng_lib.c\r
-  # $(OPENSSL_PATH)/crypto/engine/eng_list.c\r
-  # $(OPENSSL_PATH)/crypto/engine/eng_init.c\r
-  # $(OPENSSL_PATH)/crypto/engine/eng_ctrl.c\r
-  # $(OPENSSL_PATH)/crypto/engine/eng_table.c\r
-  # $(OPENSSL_PATH)/crypto/engine/eng_pkey.c\r
-  # $(OPENSSL_PATH)/crypto/engine/eng_fat.c\r
-  # $(OPENSSL_PATH)/crypto/engine/eng_all.c\r
-  # $(OPENSSL_PATH)/crypto/engine/tb_rsa.c\r
-  # $(OPENSSL_PATH)/crypto/engine/tb_dsa.c\r
-  # $(OPENSSL_PATH)/crypto/engine/tb_ecdsa.c\r
-  # $(OPENSSL_PATH)/crypto/engine/tb_dh.c\r
-  # $(OPENSSL_PATH)/crypto/engine/tb_ecdh.c\r
-  # $(OPENSSL_PATH)/crypto/engine/tb_rand.c\r
-  # $(OPENSSL_PATH)/crypto/engine/tb_store.c\r
-  # $(OPENSSL_PATH)/crypto/engine/tb_cipher.c\r
-  # $(OPENSSL_PATH)/crypto/engine/tb_digest.c\r
-  # $(OPENSSL_PATH)/crypto/engine/tb_pkmeth.c\r
-  # $(OPENSSL_PATH)/crypto/engine/tb_asnmth.c\r
-  # $(OPENSSL_PATH)/crypto/engine/eng_openssl.c\r
-  # $(OPENSSL_PATH)/crypto/engine/eng_cnf.c\r
-  # $(OPENSSL_PATH)/crypto/engine/eng_dyn.c\r
-  # $(OPENSSL_PATH)/crypto/engine/eng_cryptodev.c\r
-  # $(OPENSSL_PATH)/crypto/engine/eng_rdrand.c\r
-\r
-  #\r
-  # BUFFER\r
-  #\r
   $(OPENSSL_PATH)/crypto/buffer/buffer.c\r
   $(OPENSSL_PATH)/crypto/buffer/buf_str.c\r
   $(OPENSSL_PATH)/crypto/buffer/buf_err.c\r
-\r
-  #\r
-  # BIO\r
-  #\r
   $(OPENSSL_PATH)/crypto/bio/bio_lib.c\r
   $(OPENSSL_PATH)/crypto/bio/bio_cb.c\r
   $(OPENSSL_PATH)/crypto/bio/bio_err.c\r
   $(OPENSSL_PATH)/crypto/bio/bss_conn.c\r
   $(OPENSSL_PATH)/crypto/bio/bf_null.c\r
   $(OPENSSL_PATH)/crypto/bio/bf_buff.c\r
-  #\r
-  # Not Required by UEFI.\r
-  #\r
-  # $(OPENSSL_PATH)/crypto/bio/b_print.c\r
   $(OPENSSL_PATH)/crypto/bio/b_dump.c\r
   $(OPENSSL_PATH)/crypto/bio/b_sock.c\r
   $(OPENSSL_PATH)/crypto/bio/bss_acpt.c\r
   $(OPENSSL_PATH)/crypto/bio/bss_log.c\r
   $(OPENSSL_PATH)/crypto/bio/bss_bio.c\r
   $(OPENSSL_PATH)/crypto/bio/bss_dgram.c\r
-\r
-  #\r
-  # STACK\r
-  #\r
   $(OPENSSL_PATH)/crypto/stack/stack.c\r
-\r
-  #\r
-  # LHASH\r
-  #\r
   $(OPENSSL_PATH)/crypto/lhash/lhash.c\r
   $(OPENSSL_PATH)/crypto/lhash/lh_stats.c\r
-\r
-  #\r
-  # RAND\r
-  #\r
   $(OPENSSL_PATH)/crypto/rand/md_rand.c\r
   $(OPENSSL_PATH)/crypto/rand/randfile.c\r
   $(OPENSSL_PATH)/crypto/rand/rand_lib.c\r
   $(OPENSSL_PATH)/crypto/rand/rand_err.c\r
-  $(OPENSSL_PATH)/crypto/rand/rand_egd.c\r
-  $(OPENSSL_PATH)/crypto/rand/rand_win.c\r
+  $(OPENSSL_PATH)/crypto/rand/rand_egd.c\r
+  $(OPENSSL_PATH)/crypto/rand/rand_win.c\r
   $(OPENSSL_PATH)/crypto/rand/rand_unix.c\r
-  # $(OPENSSL_PATH)/crypto/rand/rand_os2.c\r
-  # $(OPENSSL_PATH)/crypto/rand/rand_nw.c\r
-\r
-  #\r
-  # ERR\r
-  #\r
+  $(OPENSSL_PATH)/crypto/rand/rand_os2.c\r
+  $(OPENSSL_PATH)/crypto/rand/rand_nw.c\r
   $(OPENSSL_PATH)/crypto/err/err.c\r
   $(OPENSSL_PATH)/crypto/err/err_all.c\r
   $(OPENSSL_PATH)/crypto/err/err_prn.c\r
-\r
-  #\r
-  # EVP\r
-  #\r
   $(OPENSSL_PATH)/crypto/evp/encode.c\r
   $(OPENSSL_PATH)/crypto/evp/digest.c\r
   $(OPENSSL_PATH)/crypto/evp/evp_enc.c\r
   $(OPENSSL_PATH)/crypto/evp/e_aes_cbc_hmac_sha1.c\r
   $(OPENSSL_PATH)/crypto/evp/e_aes_cbc_hmac_sha256.c\r
   $(OPENSSL_PATH)/crypto/evp/e_rc4_hmac_md5.c\r
-\r
-  #\r
-  # ASN1\r
-  #\r
   $(OPENSSL_PATH)/crypto/asn1/a_object.c\r
   $(OPENSSL_PATH)/crypto/asn1/a_bitstr.c\r
   $(OPENSSL_PATH)/crypto/asn1/a_utctm.c\r
   $(OPENSSL_PATH)/crypto/asn1/p5_pbev2.c\r
   $(OPENSSL_PATH)/crypto/asn1/p8_pkey.c\r
   $(OPENSSL_PATH)/crypto/asn1/asn_moid.c\r
-\r
-  #\r
-  # PEM\r
-  #\r
   $(OPENSSL_PATH)/crypto/pem/pem_sign.c\r
   $(OPENSSL_PATH)/crypto/pem/pem_seal.c\r
   $(OPENSSL_PATH)/crypto/pem/pem_info.c\r
   $(OPENSSL_PATH)/crypto/pem/pem_pk8.c\r
   $(OPENSSL_PATH)/crypto/pem/pem_pkey.c\r
   $(OPENSSL_PATH)/crypto/pem/pvkfmt.c\r
-\r
-  #\r
-  # X509\r
-  #\r
   $(OPENSSL_PATH)/crypto/x509/x509_def.c\r
   $(OPENSSL_PATH)/crypto/x509/x509_d2.c\r
   $(OPENSSL_PATH)/crypto/x509/x509_r2x.c\r
   $(OPENSSL_PATH)/crypto/x509/x_all.c\r
   $(OPENSSL_PATH)/crypto/x509/x509_txt.c\r
   $(OPENSSL_PATH)/crypto/x509/x509_trs.c\r
-  #\r
-  #  Not Required by UEFI.\r
-  #\r
-  # $(OPENSSL_PATH)/crypto/x509/by_file.c\r
-  # $(OPENSSL_PATH)/crypto/x509/by_dir.c\r
+  $(OPENSSL_PATH)/crypto/x509/by_file.c\r
+  $(OPENSSL_PATH)/crypto/x509/by_dir.c\r
   $(OPENSSL_PATH)/crypto/x509/x509_vpm.c\r
-\r
-  #\r
-  # X509v3\r
-  #\r
   $(OPENSSL_PATH)/crypto/x509v3/v3_bcons.c\r
   $(OPENSSL_PATH)/crypto/x509v3/v3_bitst.c\r
   $(OPENSSL_PATH)/crypto/x509v3/v3_conf.c\r
   $(OPENSSL_PATH)/crypto/x509v3/pcy_lib.c\r
   $(OPENSSL_PATH)/crypto/x509v3/v3_asid.c\r
   $(OPENSSL_PATH)/crypto/x509v3/v3_addr.c\r
-  #\r
-  #  Not Required by UEFI.\r
-  #\r
-  # $(OPENSSL_PATH)/crypto/x509v3/v3_scts.c\r
-\r
-  #\r
-  # CONF\r
-  #\r
+  $(OPENSSL_PATH)/crypto/x509v3/v3_scts.c\r
   $(OPENSSL_PATH)/crypto/conf/conf_err.c\r
   $(OPENSSL_PATH)/crypto/conf/conf_lib.c\r
   $(OPENSSL_PATH)/crypto/conf/conf_api.c\r
   $(OPENSSL_PATH)/crypto/conf/conf_mod.c\r
   $(OPENSSL_PATH)/crypto/conf/conf_mall.c\r
   $(OPENSSL_PATH)/crypto/conf/conf_sap.c\r
-\r
-  #\r
-  # TXT_DB\r
-  #\r
   $(OPENSSL_PATH)/crypto/txt_db/txt_db.c\r
-\r
-  #\r
-  # PKCS7\r
-  #\r
   $(OPENSSL_PATH)/crypto/pkcs7/pk7_asn1.c\r
   $(OPENSSL_PATH)/crypto/pkcs7/pk7_lib.c\r
   $(OPENSSL_PATH)/crypto/pkcs7/pkcs7err.c\r
   $(OPENSSL_PATH)/crypto/pkcs7/pk7_attr.c\r
   $(OPENSSL_PATH)/crypto/pkcs7/pk7_mime.c\r
   $(OPENSSL_PATH)/crypto/pkcs7/bio_pk7.c\r
-\r
-  #\r
-  # PKCS12\r
-  #\r
   $(OPENSSL_PATH)/crypto/pkcs12/p12_add.c\r
   $(OPENSSL_PATH)/crypto/pkcs12/p12_asn.c\r
   $(OPENSSL_PATH)/crypto/pkcs12/p12_attr.c\r
   $(OPENSSL_PATH)/crypto/pkcs12/pk12err.c\r
   $(OPENSSL_PATH)/crypto/pkcs12/p12_p8d.c\r
   $(OPENSSL_PATH)/crypto/pkcs12/p12_p8e.c\r
-\r
-  #\r
-  # COMP\r
-  #\r
   $(OPENSSL_PATH)/crypto/comp/comp_lib.c\r
   $(OPENSSL_PATH)/crypto/comp/comp_err.c\r
   $(OPENSSL_PATH)/crypto/comp/c_rle.c\r
   $(OPENSSL_PATH)/crypto/comp/c_zlib.c\r
-\r
-  #\r
-  # OCSP - Disabled by OPENSSL_NO_OCSP\r
-  #\r
   $(OPENSSL_PATH)/crypto/ocsp/ocsp_asn.c\r
   $(OPENSSL_PATH)/crypto/ocsp/ocsp_ext.c\r
   $(OPENSSL_PATH)/crypto/ocsp/ocsp_ht.c\r
   $(OPENSSL_PATH)/crypto/ocsp/ocsp_prn.c\r
   $(OPENSSL_PATH)/crypto/ocsp/ocsp_vfy.c\r
   $(OPENSSL_PATH)/crypto/ocsp/ocsp_err.c\r
-\r
-  #\r
-  # UI\r
-  #\r
-  $(OPENSSL_PATH)/crypto/ui/ui_lib.c\r
-  #\r
-  #  Not Required by UEFI.\r
-  #\r
-  # $(OPENSSL_PATH)/crypto/ui/ui_err.c\r
-  # $(OPENSSL_PATH)/crypto/ui/ui_openssl.c\r
-  $(OPENSSL_PATH)/crypto/ui/ui_util.c\r
-  $(OPENSSL_PATH)/crypto/ui/ui_compat.c\r
-\r
-  #\r
-  # KRB5\r
-  #\r
   $(OPENSSL_PATH)/crypto/krb5/krb5_asn.c\r
-\r
-  #\r
-  # CMS - Disabled by OPENSSL_NO_CMS\r
-  #\r
-  # $(OPENSSL_PATH)/crypto/cms/cms_lib.c\r
-  # $(OPENSSL_PATH)/crypto/cms/cms_asn1.c\r
-  # $(OPENSSL_PATH)/crypto/cms/cms_att.c\r
-  # $(OPENSSL_PATH)/crypto/cms/cms_io.c\r
-  # $(OPENSSL_PATH)/crypto/cms/cms_smime.c\r
-  # $(OPENSSL_PATH)/crypto/cms/cms_err.c\r
-  # $(OPENSSL_PATH)/crypto/cms/cms_sd.c\r
-  # $(OPENSSL_PATH)/crypto/cms/cms_dd.c\r
-  # $(OPENSSL_PATH)/crypto/cms/cms_cd.c\r
-  # $(OPENSSL_PATH)/crypto/cms/cms_env.c\r
-  # $(OPENSSL_PATH)/crypto/cms/cms_enc.c\r
-  # $(OPENSSL_PATH)/crypto/cms/cms_ess.c\r
-  # $(OPENSSL_PATH)/crypto/cms/cms_pwri.c\r
-  # $(OPENSSL_PATH)/crypto/cms/cms_kari.c\r
-\r
-  #\r
-  # PQUEUE\r
-  #\r
-  #$(OPENSSL_PATH)/crypto/pqueue/pqueue.c\r
-\r
-  #\r
-  # TS\r
-  #\r
-  #$(OPENSSL_PATH)/crypto/ts/ts_err.c\r
-  #$(OPENSSL_PATH)/crypto/ts/ts_req_utils.c\r
-  #$(OPENSSL_PATH)/crypto/ts/ts_req_print.c\r
-  #$(OPENSSL_PATH)/crypto/ts/ts_rsp_utils.c\r
-  #$(OPENSSL_PATH)/crypto/ts/ts_rsp_print.c\r
-  #$(OPENSSL_PATH)/crypto/ts/ts_rsp_sign.c\r
-  #$(OPENSSL_PATH)/crypto/ts/ts_rsp_verify.c\r
-  #$(OPENSSL_PATH)/crypto/ts/ts_verify_ctx.c\r
-  #$(OPENSSL_PATH)/crypto/ts/ts_lib.c\r
-  #$(OPENSSL_PATH)/crypto/ts/ts_conf.c\r
-  #$(OPENSSL_PATH)/crypto/ts/ts_asn1.c\r
-\r
-  #\r
-  # SRP - Disabled by OPENSSL_NO_SRP\r
-  #\r
-  # $(OPENSSL_PATH)/crypto/srp/srp_lib.c\r
-  # $(OPENSSL_PATH)/crypto/srp/srp_vfy.c\r
-\r
-  #\r
-  # CMAS\r
-  #\r
   $(OPENSSL_PATH)/crypto/cmac/cmac.c\r
   $(OPENSSL_PATH)/crypto/cmac/cm_ameth.c\r
   $(OPENSSL_PATH)/crypto/cmac/cm_pmeth.c\r
 \r
+# Autogenerated files list ends here\r
+\r
 [Packages]\r
   MdePkg/MdePkg.dec\r
   CryptoPkg/CryptoPkg.dec\r
index d2c855b2695a19bcc7ac8343e66245f27b90fb36..ac90dd4a24f528bd537969c8642d01a6c20260e9 100644 (file)
@@ -92,6 +92,9 @@ extern "C" {
 #ifndef OPENSSL_NO_POSIX_IO\r
 # define OPENSSL_NO_POSIX_IO\r
 #endif\r
+#ifndef OPENSSL_NO_PQUEUE\r
+# define OPENSSL_NO_PQUEUE\r
+#endif\r
 #ifndef OPENSSL_NO_RC2\r
 # define OPENSSL_NO_RC2\r
 #endif\r
@@ -143,6 +146,9 @@ extern "C" {
 #ifndef OPENSSL_NO_STORE\r
 # define OPENSSL_NO_STORE\r
 #endif\r
+#ifndef OPENSSL_NO_TS\r
+# define OPENSSL_NO_TS\r
+#endif\r
 #ifndef OPENSSL_NO_UI\r
 # define OPENSSL_NO_UI\r
 #endif\r
@@ -254,6 +260,9 @@ extern "C" {
 # if defined(OPENSSL_NO_POSIX_IO) && !defined(NO_POSIX_IO)\r
 #  define NO_POSIX_IO\r
 # endif\r
+# if defined(OPENSSL_NO_PQUEUE) && !defined(NO_PQUEUE)\r
+#  define NO_PQUEUE\r
+# endif\r
 # if defined(OPENSSL_NO_RC2) && !defined(NO_RC2)\r
 #  define NO_RC2\r
 # endif\r
@@ -305,6 +314,9 @@ extern "C" {
 # if defined(OPENSSL_NO_STORE) && !defined(NO_STORE)\r
 #  define NO_STORE\r
 # endif\r
+# if defined(OPENSSL_NO_TS) && !defined(NO_TS)\r
+#  define NO_TS\r
+# endif\r
 # if defined(OPENSSL_NO_UI) && !defined(NO_UI)\r
 #  define NO_UI\r
 # endif\r
diff --git a/CryptoPkg/Library/OpensslLib/process_files.sh b/CryptoPkg/Library/OpensslLib/process_files.sh
new file mode 100644 (file)
index 0000000..6247ac9
--- /dev/null
@@ -0,0 +1,97 @@
+#!/bin/sh\r
+#\r
+# This script runs the OpenSSL Configure script, then processes the\r
+# resulting file list into our local OpensslLib.inf and also takes\r
+# a copy of opensslconf.h.\r
+#\r
+# This only needs to be done once by a developer when updating to a\r
+# new version of OpenSSL (or changing options, etc.). Normal users\r
+# do not need to do this, since the results are stored in the EDK2\r
+# git repository for them.\r
+\r
+OPENSSL_PATH=$(sed -n '/DEFINE OPENSSL_PATH/{s/.* \(openssl-[0-9.]*[a-z]*\)[[:space:]]*/\1/ p}' OpensslLib.inf)\r
+\r
+if ! cd "${OPENSSL_PATH}" ; then\r
+    echo "Cannot change to OpenSSL directory \"${OPENSSL_PATH}\""\r
+    exit 1\r
+fi\r
+\r
+./Configure UEFI \\r
+       no-asm \\r
+       no-bf \\r
+       no-camellia \\r
+       no-capieng \\r
+       no-cast \\r
+       no-cms \\r
+       no-deprecated \\r
+       no-dgram \\r
+       no-dsa \\r
+       no-dynamic-engine \\r
+       no-ec \\r
+       no-ecdh \\r
+       no-ecdsa \\r
+       no-engine \\r
+       no-engines \\r
+       no-err \\r
+       no-filenames \\r
+       no-fp-api \\r
+       no-hw \\r
+       no-idea \\r
+       no-jpake \\r
+       no-krb5 \\r
+       no-locking \\r
+       no-mdc2 \\r
+       no-posix-io \\r
+       no-pqueue \\r
+       no-rc2 \\r
+       no-rcs \\r
+       no-rfc3779 \\r
+       no-ripemd \\r
+       no-scrypt \\r
+       no-sct \\r
+       no-seed \\r
+       no-sha0 \\r
+       no-sock \\r
+       no-srp \\r
+       no-ssl \\r
+       no-stdio \\r
+       no-threads \\r
+       no-ts \\r
+       no-ui \\r
+       no-whirlpool \\r
+    || exit 1\r
+\r
+make files\r
+cd -\r
+\r
+function filelist ()\r
+{\r
+    echo '1,/# Autogenerated files list starts here/p'\r
+    echo '/# Autogenerated files list ends here/,$p'\r
+    echo '/# Autogenerated files list starts here/a\'\r
+\r
+    while read LINE; do\r
+       case "$LINE" in\r
+           RELATIVE_DIRECTORY=*)\r
+               eval "$LINE"\r
+               ;;\r
+           LIBSRC=*)\r
+               LIBSRC=$(echo "$LINE" | sed s/^LIBSRC=//)\r
+               if [ "$RELATIVE_DIRECTORY" != "ssl" ]; then\r
+                   for FILE in $LIBSRC; do\r
+                       if [ "$FILE" != "b_print.c" ]; then\r
+                           echo -e '  $(OPENSSL_PATH)/'$RELATIVE_DIRECTORY/$FILE\\r\\\r
+                       fi\r
+                   done\r
+               fi\r
+               ;;\r
+       esac\r
+    done\r
+    echo -e \\r\r
+}\r
+\r
+filelist < "${OPENSSL_PATH}/MINFO" |  sed -n -f - -i OpensslLib.inf\r
+\r
+# We can tell Windows users to put this back manually if they can't run\r
+# Configure.\r
+cp "${OPENSSL_PATH}/crypto/opensslconf.h" .\r