From aa63a8660100f026dab94fd975e4256bbde1467d Mon Sep 17 00:00:00 2001 From: Jiaxin Wu Date: Wed, 30 Nov 2016 10:15:55 +0800 Subject: NetworkPkg/IpSecDxe: correct one comment and remove the unused buf Cc: Fu Siyuan Cc: Ye Ting Cc: Zhang Lubo Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu Reviewed-by: Fu Siyuan Reviewed-by: Zhang Lubo Reviewed-by: Ye Ting --- 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 @@ -657,7 +657,6 @@ Ikev2CertGenerateAuthPayload ( UINT8 *Digest; UINTN DigestSize; PRF_DATA_FRAGMENT Fragments[3]; - UINT8 *KeyBuf; IKE_PAYLOAD *AuthPayload; IKEV2_AUTH *PayloadBuf; EFI_STATUS Status; @@ -682,7 +681,6 @@ Ikev2CertGenerateAuthPayload ( // // Initial point // - KeyBuf = NULL; AuthPayload = NULL; Digest = NULL; Signature = NULL; @@ -698,17 +696,6 @@ Ikev2CertGenerateAuthPayload ( } // - // 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); @@ -863,9 +850,6 @@ Ikev2CertGenerateAuthPayload ( AuthPayload->PayloadType = IKEV2_PAYLOAD_TYPE_AUTH; EXIT: - if (KeyBuf != NULL) { - FreePool (KeyBuf); - } if (Digest != NULL) { FreePool (Digest); } @@ -1492,7 +1476,7 @@ Ikev2ParserNotifyCookiePayload ( 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. -- cgit v1.1