public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Zhang, Shenglei" <shenglei.zhang@intel.com>
To: devel@edk2.groups.io
Cc: Jian Wang <jian.j.wang@intel.com>, Ting Ye <ting.ye@intel.com>
Subject: [PATCH 1/1] CryptoPkg/BaseCryptLib: Update pHkdfCtx to PHkdfCtx
Date: Thu, 15 Aug 2019 16:49:20 +0800	[thread overview]
Message-ID: <20190815084920.20856-1-shenglei.zhang@intel.com> (raw)

Update pHkdfCtx to PHkdfCtx, to follow the variable naming
rule.

Cc: Jian Wang <jian.j.wang@intel.com>
Cc: Ting Ye <ting.ye@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
---
 .../Library/BaseCryptLib/Kdf/CryptHkdf.c      | 22 +++++++++----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/CryptoPkg/Library/BaseCryptLib/Kdf/CryptHkdf.c b/CryptoPkg/Library/BaseCryptLib/Kdf/CryptHkdf.c
index f0fcef211d3f..488346a38b8c 100644
--- a/CryptoPkg/Library/BaseCryptLib/Kdf/CryptHkdf.c
+++ b/CryptoPkg/Library/BaseCryptLib/Kdf/CryptHkdf.c
@@ -39,7 +39,7 @@ HkdfSha256ExtractAndExpand (
   IN   UINTN        OutSize
   )
 {
-  EVP_PKEY_CTX *pHkdfCtx;
+  EVP_PKEY_CTX *PHkdfCtx;
   BOOLEAN Result;
 
   if (Key == NULL || Salt == NULL || Info == NULL || Out == NULL ||
@@ -47,29 +47,29 @@ HkdfSha256ExtractAndExpand (
     return FALSE;
   }
 
-  pHkdfCtx = EVP_PKEY_CTX_new_id(EVP_PKEY_HKDF, NULL);
-  if (pHkdfCtx == NULL) {
+  PHkdfCtx = EVP_PKEY_CTX_new_id(EVP_PKEY_HKDF, NULL);
+  if (PHkdfCtx == NULL) {
     return FALSE;
   }
 
-  Result = EVP_PKEY_derive_init(pHkdfCtx) > 0;
+  Result = EVP_PKEY_derive_init(PHkdfCtx) > 0;
   if (Result) {
-    Result = EVP_PKEY_CTX_set_hkdf_md(pHkdfCtx, EVP_sha256()) > 0;
+    Result = EVP_PKEY_CTX_set_hkdf_md(PHkdfCtx, EVP_sha256()) > 0;
   }
   if (Result) {
-    Result = EVP_PKEY_CTX_set1_hkdf_salt(pHkdfCtx, Salt, (UINT32)SaltSize) > 0;
+    Result = EVP_PKEY_CTX_set1_hkdf_salt(PHkdfCtx, Salt, (UINT32)SaltSize) > 0;
   }
   if (Result) {
-    Result = EVP_PKEY_CTX_set1_hkdf_key(pHkdfCtx, Key, (UINT32)KeySize) > 0;
+    Result = EVP_PKEY_CTX_set1_hkdf_key(PHkdfCtx, Key, (UINT32)KeySize) > 0;
   }
   if (Result) {
-    Result = EVP_PKEY_CTX_add1_hkdf_info(pHkdfCtx, Info, (UINT32)InfoSize) > 0;
+    Result = EVP_PKEY_CTX_add1_hkdf_info(PHkdfCtx, Info, (UINT32)InfoSize) > 0;
   }
   if (Result) {
-    Result = EVP_PKEY_derive(pHkdfCtx, Out, &OutSize) > 0;
+    Result = EVP_PKEY_derive(PHkdfCtx, Out, &OutSize) > 0;
   }
 
-  EVP_PKEY_CTX_free(pHkdfCtx);
-  pHkdfCtx = NULL;
+  EVP_PKEY_CTX_free(PHkdfCtx);
+  PHkdfCtx = NULL;
   return Result;
 }
-- 
2.18.0.windows.1


             reply	other threads:[~2019-08-15  8:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-15  8:49 Zhang, Shenglei [this message]
2019-08-15  9:01 ` [PATCH 1/1] CryptoPkg/BaseCryptLib: Update pHkdfCtx to PHkdfCtx Wang, Jian J
2019-08-15 11:35   ` Zhang, Shenglei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190815084920.20856-1-shenglei.zhang@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox