summaryrefslogtreecommitdiff
path: root/CryptoPkg/Library/BaseCryptLib/Hmac
diff options
context:
space:
mode:
authorqlong <qlong@6f19259b-4bc3-4df7-8a09-765794883524>2010-12-31 07:22:48 +0000
committerqlong <qlong@6f19259b-4bc3-4df7-8a09-765794883524>2010-12-31 07:22:48 +0000
commit4a567c9690db97ecbf982e9428727f073bada504 (patch)
tree92682c435813f60c29afd83ad98d04ebc24903ac /CryptoPkg/Library/BaseCryptLib/Hmac
parent2a6433fef2413df583db6399008c7e6716a8e243 (diff)
downloadedk2-platforms-4a567c9690db97ecbf982e9428727f073bada504.tar.xz
1. Add new API supports for PEM & X509 key retrieving & verification;
2. Add new MD4 hash supports; 3. Add corresponding test case in Cryptest utility; 4. Fix MACRO definition issue in OpensslLib.inf and parameter checking issues in some wrapper implementations. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11214 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'CryptoPkg/Library/BaseCryptLib/Hmac')
-rw-r--r--CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacMd5.c6
-rw-r--r--CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha1.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacMd5.c b/CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacMd5.c
index 1eff5c4978..5386072c38 100644
--- a/CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacMd5.c
+++ b/CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacMd5.c
@@ -89,6 +89,12 @@ HmacMd5Duplicate (
OUT VOID *NewHmacMd5Context
)
{
+ //
+ // ASSERT if HmacMd5Context or NewHmacMd5Context is NULL.
+ //
+ ASSERT (HmacMd5Context != NULL);
+ ASSERT (NewHmacMd5Context != NULL);
+
CopyMem (NewHmacMd5Context, HmacMd5Context, sizeof (HMAC_CTX));
return TRUE;
diff --git a/CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha1.c b/CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha1.c
index 0298b80cc5..ff9377c0d2 100644
--- a/CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha1.c
+++ b/CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha1.c
@@ -89,6 +89,12 @@ HmacSha1Duplicate (
OUT VOID *NewHmacSha1Context
)
{
+ //
+ // ASSERT if HmacSha1Context or NewHmacSha1Context is NULL.
+ //
+ ASSERT (HmacSha1Context != NULL);
+ ASSERT (NewHmacSha1Context != NULL);
+
CopyMem (NewHmacSha1Context, HmacSha1Context, sizeof (HMAC_CTX));
return TRUE;