mirror of
https://git.proxmox.com/git/efi-boot-shim
synced 2025-06-13 06:00:57 +00:00

OpenSSL changes quite a bit of the key validation, and most of the keys I can find in the wild aren't marked as trusted by the new checker. Intel noticed this too: https://github.com/vathpela/edk2/commit/f536d7c3ed but instead of fixing the compatibility error, they switched their test data to match the bug. So that's pretty broken. For now, I'm reverting OpenSSL 1.1.0e, because we need those certs in the wild to work. This reverts commit513cbe2aea
. This reverts commite9cc33d6f2
. This reverts commit80d49f758e
. This reverts commit9bc647e2b2
. This reverts commitae75df6232
. This reverts commite883479f35
. This reverts commit97469449fd
. This reverts commite39692647f
. This reverts commit0f3dfc01e2
. This reverts commit4da6ac8195
. This reverts commitd064bd7eef
. This reverts commit9bc86cfd6f
. This reverts commitab9a05a10f
. Signed-off-by: Peter Jones <pjones@redhat.com>
58 lines
1.7 KiB
Diff
58 lines
1.7 KiB
Diff
diff --git a/Cryptlib/SysCall/BaseMemAllocation.c b/Cryptlib/SysCall/BaseMemAllocation.c
|
|
index 68bc25a..1abe78e 100644
|
|
--- a/Cryptlib/SysCall/BaseMemAllocation.c
|
|
+++ b/Cryptlib/SysCall/BaseMemAllocation.c
|
|
@@ -32,7 +32,7 @@ void *realloc (void *ptr, size_t size)
|
|
// BUG: hardcode OldSize == size! We have no any knowledge about
|
|
// memory size of original pointer ptr.
|
|
//
|
|
- return ReallocatePool ((UINTN) size, (UINTN) size, ptr);
|
|
+ return ReallocatePool (ptr, (UINTN) size, (UINTN) size);
|
|
}
|
|
|
|
/* De-allocates or frees a memory block */
|
|
diff --git a/Cryptlib/SysCall/TimerWrapper.c b/Cryptlib/SysCall/TimerWrapper.c
|
|
index 805e6b4..bb7bcba 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.
|
|
|
|
**/
|
|
|
|
-#include <Uefi.h>
|
|
#include <OpenSslSupport.h>
|
|
-#include <Library/UefiRuntimeServicesTableLib.h>
|
|
|
|
//
|
|
// -- Time Management Routines --
|
|
@@ -78,7 +76,7 @@ time_t time (time_t *timer)
|
|
//
|
|
// Get the current time and date information
|
|
//
|
|
- gRT->GetTime (&Time, NULL);
|
|
+ uefi_call_wrapper(RT->GetTime, 2, &Time, NULL);
|
|
|
|
//
|
|
// 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;
|