From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B8F8881EBB for ; Tue, 29 Nov 2016 18:37:07 -0800 (PST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP; 29 Nov 2016 18:37:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,719,1473145200"; d="scan'208";a="35697072" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga004.jf.intel.com with ESMTP; 29 Nov 2016 18:37:07 -0800 Received: from fmsmsx152.amr.corp.intel.com (10.18.125.5) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 29 Nov 2016 18:37:06 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX152.amr.corp.intel.com (10.18.125.5) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 29 Nov 2016 18:37:05 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.239]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.96]) with mapi id 14.03.0248.002; Wed, 30 Nov 2016 10:37:03 +0800 From: "Fu, Siyuan" To: "Wu, Jiaxin" , "edk2-devel@lists.01.org" CC: "Ye, Ting" , "Zhang, Lubo" Thread-Topic: [Patch] NetworkPkg/IpSecDxe: correct one comment and remove the unused buf Thread-Index: AQHSSrEvrAgjbC7iek6KzVQ7tvC7WKDwz9ig Date: Wed, 30 Nov 2016 02:37:02 +0000 Message-ID: References: <1480472781-122912-1-git-send-email-jiaxin.wu@intel.com> In-Reply-To: <1480472781-122912-1-git-send-email-jiaxin.wu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjY3NDkwYzUtYzFlZC00N2RlLTk4YTMtMDVlZDY5NTc5NDg5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6ImdCamlMMStaNW0wTWtVWHdrTXRRd0NCdjJxVkxoXC9uN2xWd1prY0RJemtFPSJ9 x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] NetworkPkg/IpSecDxe: correct one comment and remove the unused buf X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2016 02:37:07 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Fu Siyuan > -----Original Message----- > From: Wu, Jiaxin > Sent: Wednesday, November 30, 2016 10:26 AM > To: edk2-devel@lists.01.org > Cc: Fu, Siyuan ; Ye, Ting ; Zhang= , > Lubo > Subject: [Patch] NetworkPkg/IpSecDxe: correct one comment and remove the > unused buf >=20 > Cc: Fu Siyuan > Cc: Ye Ting > Cc: Zhang Lubo > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Jiaxin Wu > --- > NetworkPkg/IpSecDxe/Ikev2/Payload.c | 18 +----------------- > 1 file changed, 1 insertion(+), 17 deletions(-) >=20 > diff --git a/NetworkPkg/IpSecDxe/Ikev2/Payload.c > b/NetworkPkg/IpSecDxe/Ikev2/Payload.c > index 675ecf6..f32b3a8 100644 > --- a/NetworkPkg/IpSecDxe/Ikev2/Payload.c > +++ b/NetworkPkg/IpSecDxe/Ikev2/Payload.c > @@ -655,11 +655,10 @@ Ikev2CertGenerateAuthPayload ( > ) > { > UINT8 *Digest; > UINTN DigestSize; > PRF_DATA_FRAGMENT Fragments[3]; > - UINT8 *KeyBuf; > IKE_PAYLOAD *AuthPayload; > IKEV2_AUTH *PayloadBuf; > EFI_STATUS Status; > UINT8 *Signature; > UINTN SigSize; > @@ -680,11 +679,10 @@ Ikev2CertGenerateAuthPayload ( > // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-= + > // > // > // Initial point > // > - KeyBuf =3D NULL; > AuthPayload =3D NULL; > Digest =3D NULL; > Signature =3D NULL; > SigSize =3D 0; >=20 > @@ -696,21 +694,10 @@ Ikev2CertGenerateAuthPayload ( > if (Digest =3D=3D NULL) { > return NULL; > } >=20 > // > - // Store the AuthKey into KeyBuf > - // > - KeyBuf =3D AllocateZeroPool (DigestSize); > - if (KeyBuf =3D=3D NULL) { > - Status =3D EFI_OUT_OF_RESOURCES; > - goto EXIT; > - } > - > - CopyMem (KeyBuf, Digest, DigestSize); > - > - // > // Calculate Prf(SK_Pi/r, IDi/r) > // > Fragments[0].Data =3D IdPayload->PayloadBuf + sizeof > (IKEV2_COMMON_PAYLOAD_HEADER); > Fragments[0].DataSize =3D IdPayload->PayloadSize - sizeof > (IKEV2_COMMON_PAYLOAD_HEADER); >=20 > @@ -861,13 +848,10 @@ Ikev2CertGenerateAuthPayload ( > // > AuthPayload->PayloadBuf =3D (UINT8 *) PayloadBuf; > AuthPayload->PayloadType =3D IKEV2_PAYLOAD_TYPE_AUTH; >=20 > EXIT: > - if (KeyBuf !=3D NULL) { > - FreePool (KeyBuf); > - } > if (Digest !=3D NULL) { > FreePool (Digest); > } > if (Signature !=3D NULL) { > FreePool (Signature); > @@ -1490,11 +1474,11 @@ Ikev2ParserNotifyCookiePayload ( > @param[in] CertificateLen The length of Certificate in byte. > @param[in] EncodeType Specified the Certificate Encodeing whic= h > is defined > in RFC 4306. > @param[in] IsRequest To indicate create Certificate Payload o= r > Certificate > Request Payload. If it is TURE, create > Certificate > - Payload. Otherwise, create Certificate > Request Payload. > + Request Payload. Otherwise, create > Certificate Payload. >=20 > @retval a Pointer to IKE Payload whose payload buffer containing the > Certificate > payload or Certificated Request payload. >=20 > **/ > -- > 1.9.5.msysgit.1