[edk2-devel] [PATCH V2 07/29] CryptoPkg/BaseCryptLib: adapt CryptSm3.c to openssl 3.0 changes.

Li, Yi yi1.li at intel.com
Thu Aug 3 04:37:25 UTC 2023


From: Gerd Hoffmann <kraxel at redhat.com>

Functions have been renamed.

Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
Cc: Jiewen Yao <jiewen.yao at intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu at intel.com>
Cc: Guomin Jiang <guomin.jiang at intel.com>
---
 CryptoPkg/Library/BaseCryptLib/Hash/CryptSm3.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/CryptoPkg/Library/BaseCryptLib/Hash/CryptSm3.c b/CryptoPkg/Library/BaseCryptLib/Hash/CryptSm3.c
index bbbc1e56f2..03b168b9e2 100644
--- a/CryptoPkg/Library/BaseCryptLib/Hash/CryptSm3.c
+++ b/CryptoPkg/Library/BaseCryptLib/Hash/CryptSm3.c
@@ -7,7 +7,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 **/
 
 #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.
@@ -55,7 +55,7 @@ Sm3Init (
   //
   // Openssl SM3 Context Initialization
   //
-  sm3_init ((SM3_CTX *)Sm3Context);
+  ossl_sm3_init ((SM3_CTX *)Sm3Context);
   return TRUE;
 }
 
@@ -136,7 +136,7 @@ Sm3Update (
   //
   // Openssl SM3 Hash Update
   //
-  sm3_update ((SM3_CTX *)Sm3Context, Data, DataSize);
+  ossl_sm3_update ((SM3_CTX *)Sm3Context, Data, DataSize);
 
   return TRUE;
 }
@@ -178,7 +178,7 @@ Sm3Final (
   //
   // Openssl SM3 Hash Finalization
   //
-  sm3_final (HashValue, (SM3_CTX *)Sm3Context);
+  ossl_sm3_final (HashValue, (SM3_CTX *)Sm3Context);
 
   return TRUE;
 }
@@ -225,11 +225,11 @@ Sm3HashAll (
   //
   // 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;
 }
-- 
2.31.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107488): https://edk2.groups.io/g/devel/message/107488
Mute This Topic: https://groups.io/mt/100520582/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list