summaryrefslogtreecommitdiff
path: root/lib/console.c
diff options
context:
space:
mode:
authorGary Lin <glin@suse.com>2019-11-22 17:22:15 +0800
committerJavier Martinez Canillas <javier@dowhile0.org>2021-02-16 09:12:48 +0100
commit19a147061c45e7beeb3c533ef59857cac859ab15 (patch)
tree000a4fbbc9eea30991d52e2f5c708dc96faad857 /lib/console.c
parent16f4f47f5c4662ff17bbd0149204522a4f94e1f5 (diff)
downloadefi-boot-shim-19a147061c45e7beeb3c533ef59857cac859ab15.tar.gz
efi-boot-shim-19a147061c45e7beeb3c533ef59857cac859ab15.zip
lib: move print_crypto_errors() out of console.c
print_crypto_errors() will pull in the whole openssl library which bloats the size of fallback.efi. Move the function to an independent file (lib/print_crypto.c) to reduce the file size of fallback.efi from 1.3MB to 93KB. Signed-off-by: Gary Lin <glin@suse.com>
Diffstat (limited to 'lib/console.c')
-rw-r--r--lib/console.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/lib/console.c b/lib/console.c
index 00a7baad..a1d6a840 100644
--- a/lib/console.c
+++ b/lib/console.c
@@ -681,33 +681,6 @@ setup_verbosity(VOID)
setup_console(-1);
}
-/* Included here because they mess up the definition of va_list and friends */
-#include <Library/BaseCryptLib.h>
-#include <openssl/err.h>
-#include <openssl/crypto.h>
-
-static int
-print_errors_cb(const char *str, size_t len, void *u)
-{
- console_print(L"%a", str);
-
- return len;
-}
-
-EFI_STATUS
-print_crypto_errors(EFI_STATUS efi_status,
- char *file, const char *func, int line)
-{
- if (!(verbose && EFI_ERROR(efi_status)))
- return efi_status;
-
- console_print(L"SSL Error: %a:%d %a(): %r\n", file, line, func,
- efi_status);
- ERR_print_errors_cb(print_errors_cb, NULL);
-
- return efi_status;
-}
-
VOID
msleep(unsigned long msecs)
{