From 9d9e58a46813ab365c31a69662f7137f36ba98d2 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 9 Oct 2018 10:39:17 -0400 Subject: Cryptlib: Fix our update helpers and Configure Signed-off-by: Peter Jones --- CryptoPkg/Library/OpensslLib/OpensslLib.inf | 2 ++ CryptoPkg/Library/OpensslLib/openssl/Configure | 25 ++++++++++++++++++++----- CryptoPkg/Library/OpensslLib/process_files.pl | 6 +++--- CryptoPkg/Library/OpensslLib/process_files.sh | 4 ++-- 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.inf b/CryptoPkg/Library/OpensslLib/OpensslLib.inf index e69de29b..6a027dc3 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf @@ -0,0 +1,2 @@ +[Defines] + OPENSSL_PATH = openssl diff --git a/CryptoPkg/Library/OpensslLib/openssl/Configure b/CryptoPkg/Library/OpensslLib/openssl/Configure index 77b4f62a..b80492b8 100755 --- a/CryptoPkg/Library/OpensslLib/openssl/Configure +++ b/CryptoPkg/Library/OpensslLib/openssl/Configure @@ -850,17 +850,32 @@ foreach (sort (keys %disabled)) printf " no-%-12s %-10s", $_, "[$disabled{$_}]"; if (/^dso$/) - { } + { + push @{$config{openssl_other_defines}}, "OPENSSL_NO_DSO"; + print " OPENSSL_NO_DSO (no dlopen)" + } elsif (/^threads$/) - { } + { + push @{$config{openssl_other_defines}}, "OPENSSL_NO_THREADS"; + print " OPENSSL_NO_THREADS (no threading)" + } elsif (/^shared$/) - { } + { + push @{$config{openssl_other_defines}}, "OPENSSL_NO_SHARED"; + print " OPENSSL_NO_SHARED (no shared library)" + } elsif (/^pic$/) - { } + { + push @{$config{openssl_other_defines}}, "OPENSSL_NO_PIC"; + print " OPENSSL_NO_PIC (no PIC)" + } elsif (/^zlib$/) { } elsif (/^dynamic-engine$/) - { } + { + push @{$config{openssl_other_defines}}, "OPENSSL_NO_DYNAMIC_ENGINE"; + print " OPENSSL_NO_DYNAMIC_ENGINE (skip dynamic engines)" + } elsif (/^makedepend$/) { } elsif (/^zlib-dynamic$/) diff --git a/CryptoPkg/Library/OpensslLib/process_files.pl b/CryptoPkg/Library/OpensslLib/process_files.pl index 91fc3587..bbefde7e 100755 --- a/CryptoPkg/Library/OpensslLib/process_files.pl +++ b/CryptoPkg/Library/OpensslLib/process_files.pl @@ -34,7 +34,7 @@ BEGIN { die "Cannot close \"" . $inf_file . "\"!"; foreach (@inf) { - if (/DEFINE\s+OPENSSL_PATH\s*=\s*([a-z]+)/) { + if (/\s+OPENSSL_PATH\s*=\s*([a-z]+)/) { # We need to run Configure before we can include its result... $OPENSSL_PATH = $1; @@ -48,6 +48,7 @@ BEGIN { system( "./Configure", "UEFI", + "-static", "no-afalgeng", "no-asm", "no-async", @@ -65,14 +66,13 @@ BEGIN { "no-des", "no-dgram", "no-dsa", + "no-dso", "no-dynamic-engine", "no-ec", "no-ec2m", "no-ecdh", "no-ecdsa", "no-engine", - "no-err", - "no-filenames", "fips", "no-gost", "no-hw", diff --git a/CryptoPkg/Library/OpensslLib/process_files.sh b/CryptoPkg/Library/OpensslLib/process_files.sh index c7e1bd51..b5b89ff4 100755 --- a/CryptoPkg/Library/OpensslLib/process_files.sh +++ b/CryptoPkg/Library/OpensslLib/process_files.sh @@ -33,6 +33,7 @@ fi # no-sha0 \ ./Configure UEFI \ + -static \ no-afalgeng \ no-asm \ no-async \ @@ -50,14 +51,13 @@ fi no-des \ no-dgram \ no-dsa \ + no-dso \ no-dynamic-engine \ no-ec \ no-ec2m \ no-ecdh \ no-ecdsa \ no-engine \ - no-err \ - no-filenames \ fips \ no-gost \ no-hw \ -- cgit v1.2.3