From b86fbe1f980102eee3e55eed92ac91937aee638e Mon Sep 17 00:00:00 2001 From: Xiaoyu Lu Date: Thu, 20 Jun 2019 13:55:13 +0800 Subject: [PATCH] CryptoPkg/OpensslLib: disable autoload-config for OpenSSL Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=1926 This problem was found by Rebecca Cran . REF: https://edk2.groups.io/g/devel/topic/32100684 OpenSSL will automatically load a system config file which configures default ssl options. In UEFI, It will cause TlsInitialize failed without OPENSSL_INIT_NO_LOAD_CONFIG flag. we don't use this feature, So disable it. Re-run process_files.py to generate OpensslLib[Crypto].inf files. Cc: Jian J Wang Cc: Laszlo Ersek Signed-off-by: Xiaoyu Lu Reviewed-by: Rebecca Cran Reviewed-by: Jian J Wang --- CryptoPkg/Library/Include/openssl/opensslconf.h | 3 +++ CryptoPkg/Library/OpensslLib/process_files.pl | 1 + 2 files changed, 4 insertions(+) diff --git a/CryptoPkg/Library/Include/openssl/opensslconf.h b/CryptoPkg/Library/Include/openssl/opensslconf.h index 07fa2d3ce2..2b4d538e92 100644 --- a/CryptoPkg/Library/Include/openssl/opensslconf.h +++ b/CryptoPkg/Library/Include/openssl/opensslconf.h @@ -115,6 +115,9 @@ extern "C" { #ifndef OPENSSL_NO_AUTOERRINIT # define OPENSSL_NO_AUTOERRINIT #endif +#ifndef OPENSSL_NO_AUTOLOAD_CONFIG +# define OPENSSL_NO_AUTOLOAD_CONFIG +#endif #ifndef OPENSSL_NO_CAPIENG # define OPENSSL_NO_CAPIENG #endif diff --git a/CryptoPkg/Library/OpensslLib/process_files.pl b/CryptoPkg/Library/OpensslLib/process_files.pl index e277108f07..671587efe1 100755 --- a/CryptoPkg/Library/OpensslLib/process_files.pl +++ b/CryptoPkg/Library/OpensslLib/process_files.pl @@ -53,6 +53,7 @@ BEGIN { "no-async", "no-autoalginit", "no-autoerrinit", + "no-autoload-config", "no-bf", "no-blake2", "no-camellia", -- 2.39.2