diff options
author | Michael Kubacki <michael.kubacki@microsoft.com> | 2021-12-05 14:53:54 -0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-12-07 17:24:28 +0000 |
commit | 7c342378317039e632d9a1a5d4cf7c21aec8cb7a (patch) | |
tree | 6b34f630a779ee11db93c02cf54fa65c29716aed /CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha256.c | |
parent | 2b16a4fb91b9b31c0d152588f5ac51080c6c0763 (diff) | |
download | edk2-7c342378317039e632d9a1a5d4cf7c21aec8cb7a.tar.gz edk2-7c342378317039e632d9a1a5d4cf7c21aec8cb7a.tar.bz2 edk2-7c342378317039e632d9a1a5d4cf7c21aec8cb7a.zip |
CryptoPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737
Apply uncrustify changes to .c/.h files in the CryptoPkg package
Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Diffstat (limited to 'CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha256.c')
-rw-r--r-- | CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha256.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha256.c b/CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha256.c index 3fdef064f9..7e83551c1b 100644 --- a/CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha256.c +++ b/CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha256.c @@ -25,7 +25,7 @@ HmacSha256New ( //
// Allocates & Initializes HMAC_CTX Context by OpenSSL HMAC_CTX_new()
//
- return (VOID *) HMAC_CTX_new ();
+ return (VOID *)HMAC_CTX_new ();
}
/**
@@ -71,11 +71,11 @@ HmacSha256SetKey ( //
// Check input parameters.
//
- if (HmacSha256Context == NULL || KeySize > INT_MAX) {
+ if ((HmacSha256Context == NULL) || (KeySize > INT_MAX)) {
return FALSE;
}
- if (HMAC_Init_ex ((HMAC_CTX *)HmacSha256Context, Key, (UINT32) KeySize, EVP_sha256(), NULL) != 1) {
+ if (HMAC_Init_ex ((HMAC_CTX *)HmacSha256Context, Key, (UINT32)KeySize, EVP_sha256 (), NULL) != 1) {
return FALSE;
}
@@ -105,7 +105,7 @@ HmacSha256Duplicate ( //
// Check input parameters.
//
- if (HmacSha256Context == NULL || NewHmacSha256Context == NULL) {
+ if ((HmacSha256Context == NULL) || (NewHmacSha256Context == NULL)) {
return FALSE;
}
@@ -152,7 +152,7 @@ HmacSha256Update ( //
// Check invalid parameters, in case that only DataLength was checked in OpenSSL
//
- if (Data == NULL && DataSize != 0) {
+ if ((Data == NULL) && (DataSize != 0)) {
return FALSE;
}
@@ -198,7 +198,7 @@ HmacSha256Final ( //
// Check input parameters.
//
- if (HmacSha256Context == NULL || HmacValue == NULL) {
+ if ((HmacSha256Context == NULL) || (HmacValue == NULL)) {
return FALSE;
}
@@ -208,6 +208,7 @@ HmacSha256Final ( if (HMAC_Final ((HMAC_CTX *)HmacSha256Context, HmacValue, &Length) != 1) {
return FALSE;
}
+
if (HMAC_CTX_reset ((HMAC_CTX *)HmacSha256Context) != 1) {
return FALSE;
}
|