diff options
author | Hou, Wenxing <wenxing.hou@intel.com> | 2024-03-29 10:32:41 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-04-01 02:48:15 +0000 |
commit | d402de2222c3b9f52712df63dffc9a510c8fe68e (patch) | |
tree | 6007ea1a6f2b855799238965131f2ea39f9c5abd /CryptoPkg/Library/BaseCryptLibMbedTls/Hash/CryptMd5.c | |
parent | 278250045b45e98764b2e3c5171af784ea060553 (diff) | |
download | edk2-d402de2222c3b9f52712df63dffc9a510c8fe68e.tar.gz edk2-d402de2222c3b9f52712df63dffc9a510c8fe68e.tar.bz2 edk2-d402de2222c3b9f52712df63dffc9a510c8fe68e.zip |
CryptoPkg: Update Md5/Sha1/Sha2 by using new mbedtls api
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4741
Update Md5/Sha1/Sha2 by using mbedtls 3.0 api in BaseCryptLibMbedTls,
because the old API may be deprecated when open some MACRO.
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Yi Li <yi1.li@intel.com>
Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
Reviewed-by: Yi Li <yi1.li@intel.com>
Diffstat (limited to 'CryptoPkg/Library/BaseCryptLibMbedTls/Hash/CryptMd5.c')
-rw-r--r-- | CryptoPkg/Library/BaseCryptLibMbedTls/Hash/CryptMd5.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/CryptoPkg/Library/BaseCryptLibMbedTls/Hash/CryptMd5.c b/CryptoPkg/Library/BaseCryptLibMbedTls/Hash/CryptMd5.c index 35978291ca..f9590f59a0 100644 --- a/CryptoPkg/Library/BaseCryptLibMbedTls/Hash/CryptMd5.c +++ b/CryptoPkg/Library/BaseCryptLibMbedTls/Hash/CryptMd5.c @@ -8,7 +8,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include "InternalCryptLib.h"
#include <mbedtls/md5.h>
-#include <mbedtls/compat-2.x.h>
#ifdef ENABLE_MD5_DEPRECATED_INTERFACES
@@ -56,7 +55,7 @@ Md5Init ( mbedtls_md5_init (Md5Context);
- Ret = mbedtls_md5_starts_ret (Md5Context);
+ Ret = mbedtls_md5_starts (Md5Context);
if (Ret != 0) {
return FALSE;
}
@@ -129,7 +128,7 @@ Md5Update ( return FALSE;
}
- Ret = mbedtls_md5_update_ret (Md5Context, Data, DataSize);
+ Ret = mbedtls_md5_update (Md5Context, Data, DataSize);
if (Ret != 0) {
return FALSE;
}
@@ -170,7 +169,7 @@ Md5Final ( return FALSE;
}
- Ret = mbedtls_md5_finish_ret (Md5Context, HashValue);
+ Ret = mbedtls_md5_finish (Md5Context, HashValue);
mbedtls_md5_free (Md5Context);
if (Ret != 0) {
return FALSE;
@@ -215,7 +214,7 @@ Md5HashAll ( return FALSE;
}
- Ret = mbedtls_md5_ret (Data, DataSize, HashValue);
+ Ret = mbedtls_md5 (Data, DataSize, HashValue);
if (Ret != 0) {
return FALSE;
}
|