mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-23 13:44:33 +02:00
CryptoPkg/BaseCryptLib: avoid using SHA384()
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> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
parent
7fc183df71
commit
5a6455e04c
@ -204,6 +204,8 @@ Sha384HashAll (
|
|||||||
OUT UINT8 *HashValue
|
OUT UINT8 *HashValue
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
SHA512_CTX Context;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check input parameters.
|
// Check input parameters.
|
||||||
//
|
//
|
||||||
@ -218,11 +220,19 @@ Sha384HashAll (
|
|||||||
//
|
//
|
||||||
// OpenSSL SHA-384 Hash Computation.
|
// OpenSSL SHA-384 Hash Computation.
|
||||||
//
|
//
|
||||||
if (SHA384 (Data, DataSize, HashValue) == NULL) {
|
if (!SHA384_Init (&Context)) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
} else {
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!SHA384_Update (&Context, Data, DataSize)) {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!SHA384_Final (HashValue, &Context)) {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user