From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: jian.j.wang@intel.com) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by groups.io with SMTP; Thu, 15 Aug 2019 02:01:31 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Aug 2019 02:01:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,388,1559545200"; d="scan'208";a="260765290" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga001.jf.intel.com with ESMTP; 15 Aug 2019 02:01:30 -0700 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 15 Aug 2019 02:01:30 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx156.amr.corp.intel.com (10.18.116.74) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 15 Aug 2019 02:01:29 -0700 Received: from shsmsx107.ccr.corp.intel.com ([169.254.9.65]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.139]) with mapi id 14.03.0439.000; Thu, 15 Aug 2019 17:01:28 +0800 From: "Wang, Jian J" To: "Zhang, Shenglei" , "devel@edk2.groups.io" CC: "Ye, Ting" Subject: Re: [PATCH 1/1] CryptoPkg/BaseCryptLib: Update pHkdfCtx to PHkdfCtx Thread-Topic: [PATCH 1/1] CryptoPkg/BaseCryptLib: Update pHkdfCtx to PHkdfCtx Thread-Index: AQHVU0ZYUlAdejKjVkWbdZa1Nhu+Iqb76RXw Date: Thu, 15 Aug 2019 09:01:27 +0000 Message-ID: References: <20190815084920.20856-1-shenglei.zhang@intel.com> In-Reply-To: <20190815084920.20856-1-shenglei.zhang@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMTY3OGFmYTktN2NjZi00NDVlLWIyMjctYmJmYTQ5OGJiOWMwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiUU0zcXh5R3RXdnJvTFJOZFhzZmplMk5QNjViYzVnZUlpOGIrZWNVa3hWUk5vdUtteE1ybEJRRGNRNXpTSGVXVyJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: jian.j.wang@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Shenglei, I remember the edk2 coding style allows prefix 'p' (optional) to represent = a pointer variable. Regards, Jian > -----Original Message----- > From: Zhang, Shenglei > Sent: Thursday, August 15, 2019 4:49 PM > To: devel@edk2.groups.io > Cc: Wang, Jian J ; Ye, Ting > Subject: [PATCH 1/1] CryptoPkg/BaseCryptLib: Update pHkdfCtx to > PHkdfCtx >=20 > Update pHkdfCtx to PHkdfCtx, to follow the variable naming > rule. >=20 > Cc: Jian Wang > Cc: Ting Ye > Signed-off-by: Shenglei Zhang > --- > .../Library/BaseCryptLib/Kdf/CryptHkdf.c | 22 +++++++++---------- > 1 file changed, 11 insertions(+), 11 deletions(-) >=20 > 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; >=20 > if (Key =3D=3D NULL || Salt =3D=3D NULL || Info =3D=3D NULL || Out =3D= =3D NULL || > @@ -47,29 +47,29 @@ HkdfSha256ExtractAndExpand ( > return FALSE; > } >=20 > - pHkdfCtx =3D EVP_PKEY_CTX_new_id(EVP_PKEY_HKDF, NULL); > - if (pHkdfCtx =3D=3D NULL) { > + PHkdfCtx =3D EVP_PKEY_CTX_new_id(EVP_PKEY_HKDF, NULL); > + if (PHkdfCtx =3D=3D NULL) { > return FALSE; > } >=20 > - Result =3D EVP_PKEY_derive_init(pHkdfCtx) > 0; > + Result =3D EVP_PKEY_derive_init(PHkdfCtx) > 0; > if (Result) { > - Result =3D EVP_PKEY_CTX_set_hkdf_md(pHkdfCtx, EVP_sha256()) > 0; > + Result =3D EVP_PKEY_CTX_set_hkdf_md(PHkdfCtx, EVP_sha256()) > 0; > } > if (Result) { > - Result =3D EVP_PKEY_CTX_set1_hkdf_salt(pHkdfCtx, Salt, > (UINT32)SaltSize) > 0; > + Result =3D EVP_PKEY_CTX_set1_hkdf_salt(PHkdfCtx, Salt, > (UINT32)SaltSize) > 0; > } > if (Result) { > - Result =3D EVP_PKEY_CTX_set1_hkdf_key(pHkdfCtx, Key, > (UINT32)KeySize) > 0; > + Result =3D EVP_PKEY_CTX_set1_hkdf_key(PHkdfCtx, Key, > (UINT32)KeySize) > 0; > } > if (Result) { > - Result =3D EVP_PKEY_CTX_add1_hkdf_info(pHkdfCtx, Info, > (UINT32)InfoSize) > 0; > + Result =3D EVP_PKEY_CTX_add1_hkdf_info(PHkdfCtx, Info, > (UINT32)InfoSize) > 0; > } > if (Result) { > - Result =3D EVP_PKEY_derive(pHkdfCtx, Out, &OutSize) > 0; > + Result =3D EVP_PKEY_derive(PHkdfCtx, Out, &OutSize) > 0; > } >=20 > - EVP_PKEY_CTX_free(pHkdfCtx); > - pHkdfCtx =3D NULL; > + EVP_PKEY_CTX_free(PHkdfCtx); > + PHkdfCtx =3D NULL; > return Result; > } > -- > 2.18.0.windows.1