mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 07:34:06 +02:00
CryptoPkg/BaseCryptLib: adapt CryptSm3.c to openssl 3.0 changes.
Functions have been renamed. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
This commit is contained in:
parent
84158d0ebe
commit
63c8d160ae
@ -7,7 +7,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
|||||||
**/
|
**/
|
||||||
|
|
||||||
#include "InternalCryptLib.h"
|
#include "InternalCryptLib.h"
|
||||||
#include "crypto/sm3.h"
|
#include "internal/sm3.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Retrieves the size, in bytes, of the context buffer required for SM3 hash operations.
|
Retrieves the size, in bytes, of the context buffer required for SM3 hash operations.
|
||||||
@ -55,7 +55,7 @@ Sm3Init (
|
|||||||
//
|
//
|
||||||
// Openssl SM3 Context Initialization
|
// Openssl SM3 Context Initialization
|
||||||
//
|
//
|
||||||
sm3_init ((SM3_CTX *)Sm3Context);
|
ossl_sm3_init ((SM3_CTX *)Sm3Context);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ Sm3Update (
|
|||||||
//
|
//
|
||||||
// Openssl SM3 Hash Update
|
// Openssl SM3 Hash Update
|
||||||
//
|
//
|
||||||
sm3_update ((SM3_CTX *)Sm3Context, Data, DataSize);
|
ossl_sm3_update ((SM3_CTX *)Sm3Context, Data, DataSize);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -178,7 +178,7 @@ Sm3Final (
|
|||||||
//
|
//
|
||||||
// Openssl SM3 Hash Finalization
|
// Openssl SM3 Hash Finalization
|
||||||
//
|
//
|
||||||
sm3_final (HashValue, (SM3_CTX *)Sm3Context);
|
ossl_sm3_final (HashValue, (SM3_CTX *)Sm3Context);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -225,11 +225,11 @@ Sm3HashAll (
|
|||||||
//
|
//
|
||||||
// SM3 Hash Computation.
|
// SM3 Hash Computation.
|
||||||
//
|
//
|
||||||
sm3_init (&Ctx);
|
ossl_sm3_init (&Ctx);
|
||||||
|
|
||||||
sm3_update (&Ctx, Data, DataSize);
|
ossl_sm3_update (&Ctx, Data, DataSize);
|
||||||
|
|
||||||
sm3_final (HashValue, &Ctx);
|
ossl_sm3_final (HashValue, &Ctx);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user