From 2a6dc1211f9b73ca6264ce7c2ab1a8dfeb1f1c0f Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 3 Aug 2023 12:37:26 +0800 Subject: CryptoPkg/BaseCryptLib: drop BIO_* dummy functions openssl 3.0 requires a functional BIO_sprintf() implementation. Signed-off-by: Gerd Hoffmann Cc: Jiewen Yao Cc: Xiaoyu Lu Cc: Guomin Jiang Reviewed-by: Jiewen Yao Acked-by: Ard Biesheuvel Tested-by: Ard Biesheuvel Tested-by: Brian J. Johnson Tested-by: Kenneth Lautner --- .../Library/BaseCryptLib/SysCall/CrtWrapper.c | 27 ---------------------- .../BaseCryptLib/SysCall/UnitTestHostCrtWrapper.c | 25 -------------------- 2 files changed, 52 deletions(-) (limited to 'CryptoPkg/Library/BaseCryptLib') diff --git a/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c b/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c index b65d29485b..6d7ac3efdc 100644 --- a/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c +++ b/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c @@ -472,33 +472,6 @@ fwrite ( 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, - ... - ) -{ - // Because the function does not actually print anything to buf, it returns -1 as error. - // Otherwise, the consumer may think that the buf is valid and parse the buffer. - return -1; -} - #ifdef __GNUC__ typedef diff --git a/CryptoPkg/Library/BaseCryptLib/SysCall/UnitTestHostCrtWrapper.c b/CryptoPkg/Library/BaseCryptLib/SysCall/UnitTestHostCrtWrapper.c index 066d53e4fa..244e57437e 100644 --- a/CryptoPkg/Library/BaseCryptLib/SysCall/UnitTestHostCrtWrapper.c +++ b/CryptoPkg/Library/BaseCryptLib/SysCall/UnitTestHostCrtWrapper.c @@ -72,31 +72,6 @@ sscanf ( 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; -} - uid_t getuid ( void -- cgit v1.2.3