summaryrefslogtreecommitdiff
path: root/Cryptlib
diff options
context:
space:
mode:
authorGary Lin <glin@suse.com>2017-04-06 15:50:58 +0800
committerPeter Jones <pjones@redhat.com>2017-04-11 10:42:18 -0400
commit9bc86cfd6f9387f0da9d5c0102b6aa5627e91c91 (patch)
tree5176b8ca13d30609adcdf366f246ff7788a90121 /Cryptlib
parentab9a05a10f16b33f7ee1e9da360c7801eebdb9d2 (diff)
downloadefi-boot-shim-9bc86cfd6f9387f0da9d5c0102b6aa5627e91c91.tar.gz
efi-boot-shim-9bc86cfd6f9387f0da9d5c0102b6aa5627e91c91.zip
Cryptlib: Amend update.sh and refresh Cryptlib.diff
- Remove the openssl version from update.sh since edk2 doesn't use the version number in the directory name anymore. - Refresh Cryptlib.diff to reflect the change Signed-off-by: Gary Lin <glin@suse.com>
Diffstat (limited to 'Cryptlib')
-rw-r--r--Cryptlib/Cryptlib.diff68
-rwxr-xr-xCryptlib/update.sh7
2 files changed, 47 insertions, 28 deletions
diff --git a/Cryptlib/Cryptlib.diff b/Cryptlib/Cryptlib.diff
index a2f49d67..5a56470d 100644
--- a/Cryptlib/Cryptlib.diff
+++ b/Cryptlib/Cryptlib.diff
@@ -1,8 +1,20 @@
+diff --git a/Cryptlib/Include/openssl/e_os2.h b/Cryptlib/Include/openssl/e_os2.h
+index 99ea347..f11cffe 100644
+--- a/Cryptlib/Include/openssl/e_os2.h
++++ b/Cryptlib/Include/openssl/e_os2.h
+@@ -234,6 +234,7 @@ extern "C" {
+
+ /* Standard integer types */
+ # if defined(OPENSSL_SYS_UEFI)
++#include <efi.h>
+ typedef INT8 int8_t;
+ typedef UINT8 uint8_t;
+ typedef INT16 int16_t;
diff --git a/Cryptlib/SysCall/BaseMemAllocation.c b/Cryptlib/SysCall/BaseMemAllocation.c
-index 68bc25a..1abe78e 100644
+index f390e0d..65e9938 100644
--- a/Cryptlib/SysCall/BaseMemAllocation.c
+++ b/Cryptlib/SysCall/BaseMemAllocation.c
-@@ -32,7 +32,7 @@ void *realloc (void *ptr, size_t size)
+@@ -33,7 +33,7 @@ void *realloc (void *ptr, size_t size)
// BUG: hardcode OldSize == size! We have no any knowledge about
// memory size of original pointer ptr.
//
@@ -11,8 +23,33 @@ index 68bc25a..1abe78e 100644
}
/* De-allocates or frees a memory block */
+diff --git a/Cryptlib/SysCall/CrtWrapper.c b/Cryptlib/SysCall/CrtWrapper.c
+index 20c9656..7878953 100644
+--- a/Cryptlib/SysCall/CrtWrapper.c
++++ b/Cryptlib/SysCall/CrtWrapper.c
+@@ -371,20 +371,6 @@ size_t fwrite (const void *buffer, size_t size, size_t count, FILE *stream)
+ return 0;
+ }
+
+-//
+-// -- Dummy OpenSSL Support Routines --
+-//
+-
+-int BIO_printf (void *bio, const char *format, ...)
+-{
+- return 0;
+-}
+-
+-int BIO_snprintf(char *buf, size_t n, const char *format, ...)
+-{
+- return 0;
+-}
+-
+ #ifdef __GNUC__
+
+ typedef
diff --git a/Cryptlib/SysCall/TimerWrapper.c b/Cryptlib/SysCall/TimerWrapper.c
-index 805e6b4..bb7bcba 100644
+index 581b8fb..04fe4ef 100644
--- a/Cryptlib/SysCall/TimerWrapper.c
+++ b/Cryptlib/SysCall/TimerWrapper.c
@@ -13,9 +13,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@@ -20,12 +57,12 @@ index 805e6b4..bb7bcba 100644
**/
-#include <Uefi.h>
- #include <OpenSslSupport.h>
+ #include <CrtLibSupport.h>
-#include <Library/UefiRuntimeServicesTableLib.h>
//
// -- Time Management Routines --
-@@ -78,7 +76,7 @@ time_t time (time_t *timer)
+@@ -79,7 +77,7 @@ time_t time (time_t *timer)
//
// Get the current time and date information
//
@@ -34,24 +71,3 @@ index 805e6b4..bb7bcba 100644
//
// Years Handling
-diff --git a/Cryptlib/SysCall/CrtWrapper.c b/Cryptlib/SysCall/CrtWrapper.c
-index fb446b6..5a8322d 100644
---- a/Cryptlib/SysCall/CrtWrapper.c
-+++ b/Cryptlib/SysCall/CrtWrapper.c
-@@ -293,16 +293,6 @@ size_t fwrite (const void *buffer, size_t size, size_t count, FILE *stream)
- // -- Dummy OpenSSL Support Routines --
- //
-
--int BIO_printf (void *bio, const char *format, ...)
--{
-- return 0;
--}
--
--int BIO_snprintf(char *buf, size_t n, const char *format, ...)
--{
-- return 0;
--}
--
- void *UI_OpenSSL(void)
- {
- return NULL;
diff --git a/Cryptlib/update.sh b/Cryptlib/update.sh
index 255e175e..db0483ee 100755
--- a/Cryptlib/update.sh
+++ b/Cryptlib/update.sh
@@ -1,7 +1,6 @@
#!/bin/bash
DIR=$1
-OPENSSL_VERSION="1.0.2k"
cp $DIR/CryptoPkg/Library/BaseCryptLib/InternalCryptLib.h InternalCryptLib.h
cp $DIR/CryptoPkg/Library/BaseCryptLib/Hash/CryptMd4Null.c Hash/CryptMd4Null.c
@@ -29,6 +28,10 @@ cp $DIR/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c SysCall/CrtWrapper.c
cp $DIR/CryptoPkg/Library/BaseCryptLib/SysCall/TimerWrapper.c SysCall/TimerWrapper.c
cp $DIR/CryptoPkg/Library/BaseCryptLib/SysCall/BaseMemAllocation.c SysCall/BaseMemAllocation.c
-cp $DIR/CryptoPkg/Library/OpensslLib/openssl-${OPENSSL_VERSION}/include/openssl/* Include/openssl/
+cp $DIR/CryptoPkg/Library/OpensslLib/openssl/include/openssl/*.h Include/openssl/
+cp $DIR/CryptoPkg/Library/OpensslLib/openssl/include/internal/*.h Include/internal/
+cp $DIR/CryptoPkg/Library/Include/internal/dso_conf.h Include/internal/
+
+cp $DIR/CryptoPkg/Library/Include/openssl/opensslconf.h Include/openssl/
patch -p2 <Cryptlib.diff