]> git.proxmox.com Git - mirror_edk2.git/commitdiff
CryptoPkg/OpensslLib: Upgrade OpenSSL to 1.1.1g
authorGuomin Jiang <guomin.jiang@intel.com>
Fri, 10 Jul 2020 01:47:31 +0000 (09:47 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sat, 25 Jul 2020 06:27:14 +0000 (06:27 +0000)
Upgrade openssl to 1.1.1g. the directory have been reorganized,
openssl moved crypto/include/internal to include/crypto folder.
So we change directory to match the re-organization.

The dso_conf.h and opensslconf.h will generated in UNIX format,
change process_files.pl to covent the EOL automatically.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
Signed-off-by: Guomin Jiang <guomin.jiang@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
CryptoPkg/CryptoPkg.dec
CryptoPkg/Library/BaseCryptLib/Hash/CryptSm3.c
CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7VerifyEku.c
CryptoPkg/Library/Include/crypto/dso_conf.h [new file with mode: 0644]
CryptoPkg/Library/Include/internal/dso_conf.h [deleted file]
CryptoPkg/Library/Include/openssl/opensslconf.h
CryptoPkg/Library/OpensslLib/OpensslLib.inf
CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
CryptoPkg/Library/OpensslLib/openssl
CryptoPkg/Library/OpensslLib/process_files.pl
CryptoPkg/Library/OpensslLib/rand_pool.c

index 4d1a1368a8d44bf1ebe1c67c0b9f3d73a406e3b1..5888941bab4c4f101cf923eda62255c231ffa9d5 100644 (file)
@@ -23,7 +23,6 @@
   Private\r
   Library/Include\r
   Library/OpensslLib/openssl/include\r
-  Library/OpensslLib/openssl/crypto/include\r
 \r
 [LibraryClasses]\r
   ##  @libraryclass  Provides basic library functions for cryptographic primitives.\r
index eacf4826c4f7390ba3d42e103d0131e9722dcd0e..235331c2a0382008c7f49081c02c5be8b821137b 100644 (file)
@@ -7,7 +7,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 **/\r
 \r
 #include "InternalCryptLib.h"\r
-#include "internal/sm3.h"\r
+#include "crypto/sm3.h"\r
 \r
 /**\r
   Retrieves the size, in bytes, of the context buffer required for SM3 hash operations.\r
index 229c244b2657135085528ff31d1298f99fb235d4..c9fdb65b99d1d7af2ee405d14c7559ae452778a1 100644 (file)
 #include <openssl/asn1.h>\r
 #include <openssl/x509.h>\r
 #include <openssl/bio.h>\r
-#include <internal/x509_int.h>\r
+#include <crypto/x509.h>\r
 #include <openssl/pkcs7.h>\r
 #include <openssl/bn.h>\r
 #include <openssl/x509_vfy.h>\r
 #include <openssl/pem.h>\r
 #include <openssl/evp.h>\r
-#include <internal/asn1_int.h>\r
+#include <crypto/asn1.h>\r
 \r
 /**\r
   This function will return the leaf signer certificate in a chain.  This is\r
diff --git a/CryptoPkg/Library/Include/crypto/dso_conf.h b/CryptoPkg/Library/Include/crypto/dso_conf.h
new file mode 100644 (file)
index 0000000..95f4db2
--- /dev/null
@@ -0,0 +1,16 @@
+/* WARNING: do not edit! */\r
+/* Generated from include/crypto/dso_conf.h.in */\r
+/*\r
+ * Copyright 2016-2019 The OpenSSL Project Authors. All Rights Reserved.\r
+ *\r
+ * Licensed under the OpenSSL license (the "License").  You may not use\r
+ * this file except in compliance with the License.  You can obtain a copy\r
+ * in the file LICENSE in the source distribution or at\r
+ * https://www.openssl.org/source/license.html\r
+ */\r
+\r
+#ifndef OSSL_CRYPTO_DSO_CONF_H\r
+# define OSSL_CRYPTO_DSO_CONF_H\r
+# define DSO_NONE\r
+# define DSO_EXTENSION ".so"\r
+#endif\r
diff --git a/CryptoPkg/Library/Include/internal/dso_conf.h b/CryptoPkg/Library/Include/internal/dso_conf.h
deleted file mode 100644 (file)
index 43c8915..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/* WARNING: do not edit! */
-/* Generated from crypto/include/internal/dso_conf.h.in */
-/*
- * Copyright 2016-2019 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
- */
-
-#ifndef HEADER_DSO_CONF_H
-# define HEADER_DSO_CONF_H
-# define DSO_NONE
-# define DSO_EXTENSION ".so"
-#endif
index 62c2736cb0b57acfdd22e2567b01528dd09052d2..3a2544ea5ccc15e6190e253186774c6c92d48f53 100644 (file)
@@ -247,9 +247,6 @@ extern "C" {
 #ifndef OPENSSL_NO_DYNAMIC_ENGINE\r
 # define OPENSSL_NO_DYNAMIC_ENGINE\r
 #endif\r
-#ifndef OPENSSL_NO_AFALGENG\r
-# define OPENSSL_NO_AFALGENG\r
-#endif\r
 \r
 \r
 /*\r
index c8ec9454bd908e37dd6e2bd24801afe4bb063ba8..dbbe5386a10c498ae71cf830189721559e071112 100644 (file)
   $(OPENSSL_PATH)/crypto/s390x_arch.h\r
   $(OPENSSL_PATH)/crypto/sparc_arch.h\r
   $(OPENSSL_PATH)/crypto/vms_rms.h\r
-  $(OPENSSL_PATH)/crypto/aes/aes_locl.h\r
+  $(OPENSSL_PATH)/crypto/aes/aes_local.h\r
   $(OPENSSL_PATH)/crypto/asn1/asn1_item_list.h\r
-  $(OPENSSL_PATH)/crypto/asn1/asn1_locl.h\r
+  $(OPENSSL_PATH)/crypto/asn1/asn1_local.h\r
   $(OPENSSL_PATH)/crypto/asn1/charmap.h\r
   $(OPENSSL_PATH)/crypto/asn1/standard_methods.h\r
   $(OPENSSL_PATH)/crypto/asn1/tbl_standard.h\r
-  $(OPENSSL_PATH)/crypto/async/async_locl.h\r
+  $(OPENSSL_PATH)/crypto/async/async_local.h\r
   $(OPENSSL_PATH)/crypto/async/arch/async_null.h\r
   $(OPENSSL_PATH)/crypto/async/arch/async_posix.h\r
   $(OPENSSL_PATH)/crypto/async/arch/async_win.h\r
-  $(OPENSSL_PATH)/crypto/bio/bio_lcl.h\r
-  $(OPENSSL_PATH)/crypto/bn/bn_lcl.h\r
+  $(OPENSSL_PATH)/crypto/bio/bio_local.h\r
+  $(OPENSSL_PATH)/crypto/bn/bn_local.h\r
   $(OPENSSL_PATH)/crypto/bn/bn_prime.h\r
   $(OPENSSL_PATH)/crypto/bn/rsaz_exp.h\r
-  $(OPENSSL_PATH)/crypto/comp/comp_lcl.h\r
+  $(OPENSSL_PATH)/crypto/comp/comp_local.h\r
   $(OPENSSL_PATH)/crypto/conf/conf_def.h\r
-  $(OPENSSL_PATH)/crypto/conf/conf_lcl.h\r
-  $(OPENSSL_PATH)/crypto/dh/dh_locl.h\r
-  $(OPENSSL_PATH)/crypto/dso/dso_locl.h\r
-  $(OPENSSL_PATH)/crypto/evp/evp_locl.h\r
-  $(OPENSSL_PATH)/crypto/hmac/hmac_lcl.h\r
-  $(OPENSSL_PATH)/crypto/lhash/lhash_lcl.h\r
-  $(OPENSSL_PATH)/crypto/md5/md5_locl.h\r
-  $(OPENSSL_PATH)/crypto/modes/modes_lcl.h\r
+  $(OPENSSL_PATH)/crypto/conf/conf_local.h\r
+  $(OPENSSL_PATH)/crypto/dh/dh_local.h\r
+  $(OPENSSL_PATH)/crypto/dso/dso_local.h\r
+  $(OPENSSL_PATH)/crypto/evp/evp_local.h\r
+  $(OPENSSL_PATH)/crypto/hmac/hmac_local.h\r
+  $(OPENSSL_PATH)/crypto/lhash/lhash_local.h\r
+  $(OPENSSL_PATH)/crypto/md5/md5_local.h\r
+  $(OPENSSL_PATH)/crypto/modes/modes_local.h\r
   $(OPENSSL_PATH)/crypto/objects/obj_dat.h\r
-  $(OPENSSL_PATH)/crypto/objects/obj_lcl.h\r
+  $(OPENSSL_PATH)/crypto/objects/obj_local.h\r
   $(OPENSSL_PATH)/crypto/objects/obj_xref.h\r
-  $(OPENSSL_PATH)/crypto/ocsp/ocsp_lcl.h\r
-  $(OPENSSL_PATH)/crypto/pkcs12/p12_lcl.h\r
-  $(OPENSSL_PATH)/crypto/rand/rand_lcl.h\r
-  $(OPENSSL_PATH)/crypto/rsa/rsa_locl.h\r
-  $(OPENSSL_PATH)/crypto/sha/sha_locl.h\r
+  $(OPENSSL_PATH)/crypto/ocsp/ocsp_local.h\r
+  $(OPENSSL_PATH)/crypto/pkcs12/p12_local.h\r
+  $(OPENSSL_PATH)/crypto/rand/rand_local.h\r
+  $(OPENSSL_PATH)/crypto/rsa/rsa_local.h\r
+  $(OPENSSL_PATH)/crypto/sha/sha_local.h\r
   $(OPENSSL_PATH)/crypto/siphash/siphash_local.h\r
-  $(OPENSSL_PATH)/crypto/sm3/sm3_locl.h\r
-  $(OPENSSL_PATH)/crypto/store/store_locl.h\r
-  $(OPENSSL_PATH)/crypto/ui/ui_locl.h\r
-  $(OPENSSL_PATH)/crypto/x509/x509_lcl.h\r
+  $(OPENSSL_PATH)/crypto/sm3/sm3_local.h\r
+  $(OPENSSL_PATH)/crypto/store/store_local.h\r
+  $(OPENSSL_PATH)/crypto/ui/ui_local.h\r
+  $(OPENSSL_PATH)/crypto/x509/x509_local.h\r
   $(OPENSSL_PATH)/crypto/x509v3/ext_dat.h\r
-  $(OPENSSL_PATH)/crypto/x509v3/pcy_int.h\r
+  $(OPENSSL_PATH)/crypto/x509v3/pcy_local.h\r
   $(OPENSSL_PATH)/crypto/x509v3/standard_exts.h\r
   $(OPENSSL_PATH)/crypto/x509v3/v3_admis.h\r
   $(OPENSSL_PATH)/ssl/bio_ssl.c\r
   $(OPENSSL_PATH)/ssl/t1_trce.c\r
   $(OPENSSL_PATH)/ssl/tls13_enc.c\r
   $(OPENSSL_PATH)/ssl/tls_srp.c\r
-  $(OPENSSL_PATH)/ssl/packet_locl.h\r
+  $(OPENSSL_PATH)/ssl/packet_local.h\r
   $(OPENSSL_PATH)/ssl/ssl_cert_table.h\r
-  $(OPENSSL_PATH)/ssl/ssl_locl.h\r
+  $(OPENSSL_PATH)/ssl/ssl_local.h\r
   $(OPENSSL_PATH)/ssl/record/record.h\r
-  $(OPENSSL_PATH)/ssl/record/record_locl.h\r
+  $(OPENSSL_PATH)/ssl/record/record_local.h\r
   $(OPENSSL_PATH)/ssl/statem/statem.h\r
-  $(OPENSSL_PATH)/ssl/statem/statem_locl.h\r
+  $(OPENSSL_PATH)/ssl/statem/statem_local.h\r
 # Autogenerated files list ends here\r
   buildinf.h\r
   rand_pool_noise.h\r
index 2f232e3e128910c10a9200bcfe43c622e3661919..616ccd9f62d14273b7b0c9bf1e9336fbb7949c9e 100644 (file)
   $(OPENSSL_PATH)/crypto/s390x_arch.h\r
   $(OPENSSL_PATH)/crypto/sparc_arch.h\r
   $(OPENSSL_PATH)/crypto/vms_rms.h\r
-  $(OPENSSL_PATH)/crypto/aes/aes_locl.h\r
+  $(OPENSSL_PATH)/crypto/aes/aes_local.h\r
   $(OPENSSL_PATH)/crypto/asn1/asn1_item_list.h\r
-  $(OPENSSL_PATH)/crypto/asn1/asn1_locl.h\r
+  $(OPENSSL_PATH)/crypto/asn1/asn1_local.h\r
   $(OPENSSL_PATH)/crypto/asn1/charmap.h\r
   $(OPENSSL_PATH)/crypto/asn1/standard_methods.h\r
   $(OPENSSL_PATH)/crypto/asn1/tbl_standard.h\r
-  $(OPENSSL_PATH)/crypto/async/async_locl.h\r
+  $(OPENSSL_PATH)/crypto/async/async_local.h\r
   $(OPENSSL_PATH)/crypto/async/arch/async_null.h\r
   $(OPENSSL_PATH)/crypto/async/arch/async_posix.h\r
   $(OPENSSL_PATH)/crypto/async/arch/async_win.h\r
-  $(OPENSSL_PATH)/crypto/bio/bio_lcl.h\r
-  $(OPENSSL_PATH)/crypto/bn/bn_lcl.h\r
+  $(OPENSSL_PATH)/crypto/bio/bio_local.h\r
+  $(OPENSSL_PATH)/crypto/bn/bn_local.h\r
   $(OPENSSL_PATH)/crypto/bn/bn_prime.h\r
   $(OPENSSL_PATH)/crypto/bn/rsaz_exp.h\r
-  $(OPENSSL_PATH)/crypto/comp/comp_lcl.h\r
+  $(OPENSSL_PATH)/crypto/comp/comp_local.h\r
   $(OPENSSL_PATH)/crypto/conf/conf_def.h\r
-  $(OPENSSL_PATH)/crypto/conf/conf_lcl.h\r
-  $(OPENSSL_PATH)/crypto/dh/dh_locl.h\r
-  $(OPENSSL_PATH)/crypto/dso/dso_locl.h\r
-  $(OPENSSL_PATH)/crypto/evp/evp_locl.h\r
-  $(OPENSSL_PATH)/crypto/hmac/hmac_lcl.h\r
-  $(OPENSSL_PATH)/crypto/lhash/lhash_lcl.h\r
-  $(OPENSSL_PATH)/crypto/md5/md5_locl.h\r
-  $(OPENSSL_PATH)/crypto/modes/modes_lcl.h\r
+  $(OPENSSL_PATH)/crypto/conf/conf_local.h\r
+  $(OPENSSL_PATH)/crypto/dh/dh_local.h\r
+  $(OPENSSL_PATH)/crypto/dso/dso_local.h\r
+  $(OPENSSL_PATH)/crypto/evp/evp_local.h\r
+  $(OPENSSL_PATH)/crypto/hmac/hmac_local.h\r
+  $(OPENSSL_PATH)/crypto/lhash/lhash_local.h\r
+  $(OPENSSL_PATH)/crypto/md5/md5_local.h\r
+  $(OPENSSL_PATH)/crypto/modes/modes_local.h\r
   $(OPENSSL_PATH)/crypto/objects/obj_dat.h\r
-  $(OPENSSL_PATH)/crypto/objects/obj_lcl.h\r
+  $(OPENSSL_PATH)/crypto/objects/obj_local.h\r
   $(OPENSSL_PATH)/crypto/objects/obj_xref.h\r
-  $(OPENSSL_PATH)/crypto/ocsp/ocsp_lcl.h\r
-  $(OPENSSL_PATH)/crypto/pkcs12/p12_lcl.h\r
-  $(OPENSSL_PATH)/crypto/rand/rand_lcl.h\r
-  $(OPENSSL_PATH)/crypto/rsa/rsa_locl.h\r
-  $(OPENSSL_PATH)/crypto/sha/sha_locl.h\r
+  $(OPENSSL_PATH)/crypto/ocsp/ocsp_local.h\r
+  $(OPENSSL_PATH)/crypto/pkcs12/p12_local.h\r
+  $(OPENSSL_PATH)/crypto/rand/rand_local.h\r
+  $(OPENSSL_PATH)/crypto/rsa/rsa_local.h\r
+  $(OPENSSL_PATH)/crypto/sha/sha_local.h\r
   $(OPENSSL_PATH)/crypto/siphash/siphash_local.h\r
-  $(OPENSSL_PATH)/crypto/sm3/sm3_locl.h\r
-  $(OPENSSL_PATH)/crypto/store/store_locl.h\r
-  $(OPENSSL_PATH)/crypto/ui/ui_locl.h\r
-  $(OPENSSL_PATH)/crypto/x509/x509_lcl.h\r
+  $(OPENSSL_PATH)/crypto/sm3/sm3_local.h\r
+  $(OPENSSL_PATH)/crypto/store/store_local.h\r
+  $(OPENSSL_PATH)/crypto/ui/ui_local.h\r
+  $(OPENSSL_PATH)/crypto/x509/x509_local.h\r
   $(OPENSSL_PATH)/crypto/x509v3/ext_dat.h\r
-  $(OPENSSL_PATH)/crypto/x509v3/pcy_int.h\r
+  $(OPENSSL_PATH)/crypto/x509v3/pcy_local.h\r
   $(OPENSSL_PATH)/crypto/x509v3/standard_exts.h\r
   $(OPENSSL_PATH)/crypto/x509v3/v3_admis.h\r
 # Autogenerated files list ends here\r
index c3656cc594daac8167721dde7220f0e59ae146fc..e2e09d9fba1187f8d6aafaa34d4172f56f1ffb72 160000 (submodule)
@@ -1 +1 @@
-Subproject commit c3656cc594daac8167721dde7220f0e59ae146fc
+Subproject commit e2e09d9fba1187f8d6aafaa34d4172f56f1ffb72
index 65d07a2aed446f47c64bd64f84c329c578a5628b..57ce1953947b0a1347cccf2f0fe58fa1b74d8a2c 100755 (executable)
@@ -111,8 +111,8 @@ BEGIN {
             # Generate dso_conf.h per config data\r
             system(\r
                 "perl -I. -Mconfigdata util/dofile.pl " .\r
-                "crypto/include/internal/dso_conf.h.in " .\r
-                "> include/internal/dso_conf.h"\r
+                "include/crypto/dso_conf.h.in " .\r
+                "> include/crypto/dso_conf.h"\r
                 ) == 0 ||\r
                     die "Failed to generate dso_conf.h!\n";\r
 \r
@@ -263,14 +263,21 @@ print "Done!";
 # Copy opensslconf.h and dso_conf.h generated from OpenSSL Configuration\r
 #\r
 print "\n--> Duplicating opensslconf.h into Include/openssl ... ";\r
-copy($OPENSSL_PATH . "/include/openssl/opensslconf.h",\r
-     $OPENSSL_PATH . "/../../Include/openssl/") ||\r
-   die "Cannot copy opensslconf.h!";\r
+system(\r
+    "perl -pe 's/\\n/\\r\\n/' " .\r
+    "< " . $OPENSSL_PATH . "/include/openssl/opensslconf.h " .\r
+    "> " . $OPENSSL_PATH . "/../../Include/openssl/opensslconf.h"\r
+    ) == 0 ||\r
+    die "Cannot copy opensslconf.h!";\r
 print "Done!";\r
-print "\n--> Duplicating dso_conf.h into Include/internal ... ";\r
-copy($OPENSSL_PATH . "/include/internal/dso_conf.h",\r
-     $OPENSSL_PATH . "/../../Include/internal/") ||\r
-   die "Cannot copy dso_conf.h!";\r
+\r
+print "\n--> Duplicating dso_conf.h into Include/crypto ... ";\r
+system(\r
+    "perl -pe 's/\\n/\\r\\n/' " .\r
+    "< " . $OPENSSL_PATH . "/include/crypto/dso_conf.h" .\r
+    "> " . $OPENSSL_PATH . "/../../Include/crypto/dso_conf.h"\r
+    ) == 0 ||\r
+    die "Cannot copy dso_conf.h!";\r
 print "Done!\n";\r
 \r
 print "\nProcessing Files Done!\n";\r
index 9f3983f7c35b816608b1ba541953399d339e6a93..9e0179b03490d961ae9fb57d97eabbfacd70cf12 100644 (file)
@@ -7,7 +7,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 \r
 **/\r
 \r
-#include "internal/rand_int.h"\r
+#include "crypto/rand.h"\r
 #include <openssl/aes.h>\r
 \r
 #include <Uefi.h>\r