From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 0DEE781E91 for ; Tue, 29 Nov 2016 18:26:26 -0800 (PST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP; 29 Nov 2016 18:26:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,719,1473145200"; d="scan'208";a="37204382" Received: from jiaxinwu-mobl2.ccr.corp.intel.com ([10.239.196.153]) by fmsmga006.fm.intel.com with ESMTP; 29 Nov 2016 18:26:24 -0800 From: Jiaxin Wu To: edk2-devel@lists.01.org Cc: Fu Siyuan , Ye Ting , Zhang Lubo Date: Wed, 30 Nov 2016 10:26:21 +0800 Message-Id: <1480472781-122912-1-git-send-email-jiaxin.wu@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 Subject: [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:26:26 -0000 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(-) 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 = NULL; AuthPayload = NULL; Digest = NULL; Signature = NULL; SigSize = 0; @@ -696,21 +694,10 @@ Ikev2CertGenerateAuthPayload ( if (Digest == NULL) { return NULL; } // - // Store the AuthKey into KeyBuf - // - KeyBuf = AllocateZeroPool (DigestSize); - if (KeyBuf == NULL) { - Status = EFI_OUT_OF_RESOURCES; - goto EXIT; - } - - CopyMem (KeyBuf, Digest, DigestSize); - - // // Calculate Prf(SK_Pi/r, IDi/r) // Fragments[0].Data = IdPayload->PayloadBuf + sizeof (IKEV2_COMMON_PAYLOAD_HEADER); Fragments[0].DataSize = IdPayload->PayloadSize - sizeof (IKEV2_COMMON_PAYLOAD_HEADER); @@ -861,13 +848,10 @@ Ikev2CertGenerateAuthPayload ( // AuthPayload->PayloadBuf = (UINT8 *) PayloadBuf; AuthPayload->PayloadType = IKEV2_PAYLOAD_TYPE_AUTH; EXIT: - if (KeyBuf != NULL) { - FreePool (KeyBuf); - } if (Digest != NULL) { FreePool (Digest); } if (Signature != NULL) { FreePool (Signature); @@ -1490,11 +1474,11 @@ Ikev2ParserNotifyCookiePayload ( @param[in] CertificateLen The length of Certificate in byte. @param[in] EncodeType Specified the Certificate Encodeing which is defined in RFC 4306. @param[in] IsRequest To indicate create Certificate Payload or Certificate Request Payload. If it is TURE, create Certificate - Payload. Otherwise, create Certificate Request Payload. + Request Payload. Otherwise, create Certificate Payload. @retval a Pointer to IKE Payload whose payload buffer containing the Certificate payload or Certificated Request payload. **/ -- 1.9.5.msysgit.1