summaryrefslogtreecommitdiff
path: root/NetworkPkg/IpSecDxe
diff options
context:
space:
mode:
authorJiaxin Wu <jiaxin.wu@intel.com>2016-11-30 10:15:55 +0800
committerJiaxin Wu <jiaxin.wu@intel.com>2016-12-06 18:37:25 +0800
commitaa63a8660100f026dab94fd975e4256bbde1467d (patch)
treee3a231af0d41697a2726ba0f3051afe3e9f51474 /NetworkPkg/IpSecDxe
parent46d4b181bb3b05f95eb29c1550c612450488424c (diff)
downloadedk2-platforms-aa63a8660100f026dab94fd975e4256bbde1467d.tar.xz
NetworkPkg/IpSecDxe: correct one comment and remove the unused buf
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>
Diffstat (limited to 'NetworkPkg/IpSecDxe')
-rw-r--r--NetworkPkg/IpSecDxe/Ikev2/Payload.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/NetworkPkg/IpSecDxe/Ikev2/Payload.c b/NetworkPkg/IpSecDxe/Ikev2/Payload.c
index 675ecf6f74..f32b3a8394 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.