]> git.proxmox.com Git - mirror_edk2.git/commitdiff
NetworkPkg/IpSecDxe: correct one comment and remove the unused buf
authorJiaxin Wu <jiaxin.wu@intel.com>
Wed, 30 Nov 2016 02:15:55 +0000 (10:15 +0800)
committerJiaxin Wu <jiaxin.wu@intel.com>
Tue, 6 Dec 2016 10:37:25 +0000 (18:37 +0800)
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Zhang Lubo <lubo.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
NetworkPkg/IpSecDxe/Ikev2/Payload.c

index 675ecf6f747138e57e0d1e3c5200f1a1efb70ebd..f32b3a83946a4e779470880b383f6b6dee00ca60 100644 (file)
@@ -657,7 +657,6 @@ Ikev2CertGenerateAuthPayload (
   UINT8              *Digest;\r
   UINTN              DigestSize;\r
   PRF_DATA_FRAGMENT  Fragments[3];\r
-  UINT8              *KeyBuf;\r
   IKE_PAYLOAD        *AuthPayload;\r
   IKEV2_AUTH         *PayloadBuf;\r
   EFI_STATUS         Status;\r
@@ -682,7 +681,6 @@ Ikev2CertGenerateAuthPayload (
   //\r
   // Initial point\r
   //\r
-  KeyBuf      = NULL;\r
   AuthPayload = NULL;\r
   Digest      = NULL;\r
   Signature   = NULL;\r
@@ -697,17 +695,6 @@ Ikev2CertGenerateAuthPayload (
     return NULL;\r
   }\r
 \r
-  //\r
-  // Store the AuthKey into KeyBuf\r
-  //\r
-  KeyBuf  = AllocateZeroPool (DigestSize);\r
-  if (KeyBuf == NULL) {\r
-    Status = EFI_OUT_OF_RESOURCES;\r
-    goto EXIT;\r
-  }\r
-  \r
-  CopyMem (KeyBuf, Digest, DigestSize);\r
-\r
   //\r
   // Calculate Prf(SK_Pi/r, IDi/r)\r
   //\r
@@ -863,9 +850,6 @@ Ikev2CertGenerateAuthPayload (
   AuthPayload->PayloadType  = IKEV2_PAYLOAD_TYPE_AUTH;\r
 \r
 EXIT:\r
-  if (KeyBuf != NULL) {\r
-    FreePool (KeyBuf);\r
-  }\r
   if (Digest != NULL) {\r
     FreePool (Digest);\r
   }\r
@@ -1492,7 +1476,7 @@ Ikev2ParserNotifyCookiePayload (
                                 in RFC 4306.\r
   @param[in]  IsRequest         To indicate create Certificate Payload or Certificate\r
                                 Request Payload. If it is TURE, create Certificate\r
-                                Payload. Otherwise, create Certificate Request Payload.\r
+                                Request Payload. Otherwise, create Certificate Payload.\r
 \r
   @retval  a Pointer to IKE Payload whose payload buffer containing the Certificate\r
            payload or Certificated Request payload.\r