In openssl 3.0 SHA384() goes through the provider logic,
requiring a huge amount of openssl code. The individual
functions do not, so use them instead.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
.../Library/BaseCryptLib/Hash/CryptSha512.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/CryptoPkg/Library/BaseCryptLib/Hash/CryptSha512.c b/CryptoPkg/Library/BaseCryptLib/Hash/CryptSha512.c
index 59e570846588..2ab7188035e8 100644
--- a/CryptoPkg/Library/BaseCryptLib/Hash/CryptSha512.c
+++ b/CryptoPkg/Library/BaseCryptLib/Hash/CryptSha512.c
@@ -204,6 +204,8 @@ Sha384HashAll (
OUT UINT8 *HashValue
)
{
+ SHA512_CTX Context;
+
//
// Check input parameters.
//
@@ -218,11 +220,19 @@ Sha384HashAll (
//
// OpenSSL SHA-384 Hash Computation.
//
- if (SHA384 (Data, DataSize, HashValue) == NULL) {
+ if (!SHA384_Init (&Context)) {
return FALSE;
- } else {
- return TRUE;
}
+
+ if (!SHA384_Update (&Context, Data, DataSize)) {
+ return FALSE;
+ }
+
+ if (!SHA384_Final (HashValue, &Context)) {
+ return FALSE;
+ }
+
+ return TRUE;
}
/**
--
2.39.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#100124): https://edk2.groups.io/g/devel/message/100124
Mute This Topic: https://groups.io/mt/96943600/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-