diff options
author | Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hp.com> | 2015-07-01 03:35:32 +0000 |
---|---|---|
committer | sfu5 <sfu5@Edk2> | 2015-07-01 03:35:32 +0000 |
commit | e8837eddf327e39fe9a851119f17d7f5fb9b1029 (patch) | |
tree | 673ac8b3aff410169809ba9e3450189a001ed8a4 /NetworkPkg/IpSecDxe/Ikev2 | |
parent | 7ae77cee9627f417b3bbcc3334d3823ff248a3f5 (diff) | |
download | edk2-e8837eddf327e39fe9a851119f17d7f5fb9b1029.tar.gz edk2-e8837eddf327e39fe9a851119f17d7f5fb9b1029.tar.bz2 edk2-e8837eddf327e39fe9a851119f17d7f5fb9b1029.zip |
NetworkPkg: Remove unused variables from IpSecDxe to fix GCC build.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hp.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17773 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'NetworkPkg/IpSecDxe/Ikev2')
-rw-r--r-- | NetworkPkg/IpSecDxe/Ikev2/Info.c | 3 | ||||
-rw-r--r-- | NetworkPkg/IpSecDxe/Ikev2/Payload.c | 16 | ||||
-rw-r--r-- | NetworkPkg/IpSecDxe/Ikev2/Sa.c | 9 | ||||
-rw-r--r-- | NetworkPkg/IpSecDxe/Ikev2/Utility.c | 3 |
4 files changed, 5 insertions, 26 deletions
diff --git a/NetworkPkg/IpSecDxe/Ikev2/Info.c b/NetworkPkg/IpSecDxe/Ikev2/Info.c index d297564f11..fe75d6c596 100644 --- a/NetworkPkg/IpSecDxe/Ikev2/Info.c +++ b/NetworkPkg/IpSecDxe/Ikev2/Info.c @@ -1,6 +1,7 @@ /** @file
The Implementations for Information Exchange.
+ (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
@@ -211,7 +212,6 @@ Ikev2InfoParser ( {
IKEV2_CHILD_SA_SESSION *ChildSaSession;
IKEV2_SA_SESSION *IkeSaSession;
- IKE_PAYLOAD *NotifyPayload;
IKE_PAYLOAD *DeletePayload;
IKE_PAYLOAD *IkePayload;
IKEV2_DELETE *Delete;
@@ -229,7 +229,6 @@ Ikev2InfoParser ( IkeSaSession = (IKEV2_SA_SESSION *) SaSession;
- NotifyPayload = NULL;
DeletePayload = NULL;
Private = NULL;
RespondPacket = NULL;
diff --git a/NetworkPkg/IpSecDxe/Ikev2/Payload.c b/NetworkPkg/IpSecDxe/Ikev2/Payload.c index 012e8c24b3..b92ae3a599 100644 --- a/NetworkPkg/IpSecDxe/Ikev2/Payload.c +++ b/NetworkPkg/IpSecDxe/Ikev2/Payload.c @@ -1,6 +1,7 @@ /** @file
The implementation of Payloads Creation.
+ (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
@@ -284,7 +285,6 @@ Ikev2GenerateCertIdPayload ( IKE_PAYLOAD *IdPayload;
IKEV2_ID *Id;
UINTN IdSize;
- UINT8 IpVersion;
UINTN SubjectSize;
UINT8 *CertSubject;
@@ -304,7 +304,6 @@ Ikev2GenerateCertIdPayload ( SubjectSize = 0;
CertSubject = NULL;
- IpVersion = CommonSession->UdpService->IpVersion;
IpSecCryptoIoGetSubjectFromCert (
InCert,
CertSize,
@@ -615,7 +614,6 @@ Ikev2CertGenerateAuthPayload ( UINTN DigestSize;
PRF_DATA_FRAGMENT Fragments[3];
UINT8 *KeyBuf;
- UINTN KeySize;
IKE_PAYLOAD *AuthPayload;
IKEV2_AUTH *PayloadBuf;
EFI_STATUS Status;
@@ -663,7 +661,6 @@ Ikev2CertGenerateAuthPayload ( ASSERT (KeyBuf != NULL);
CopyMem (KeyBuf, Digest, DigestSize);
- KeySize = DigestSize;
//
// Calculate Prf(SK_Pi/r, IDi/r)
@@ -2558,14 +2555,12 @@ Ikev2DecryptPacket ( IKEV2_CHILD_SA_SESSION *ChildSaSession;
EFI_STATUS Status;
UINT8 PadLen;
- UINTN CryptKeyLength;
HASH_DATA_FRAGMENT Fragments[1];
IvSize = 0;
IkeSaSession = NULL;
CryptBlockSize = 0;
CheckSumSize = 0;
- CryptKeyLength = 0;
//
// Check if the first payload is the Encrypted payload
@@ -2583,7 +2578,7 @@ Ikev2DecryptPacket ( if (SessionCommon->IkeSessionType == IkeSessionTypeIkeSa) {
CryptBlockSize = (UINT8) IpSecGetEncryptBlockSize ((UINT8) SessionCommon->SaParams->EncAlgId);
- CryptKeyLength = IpSecGetEncryptKeyLength ((UINT8) SessionCommon->SaParams->EncAlgId);
+
CheckSumSize = (UINT8) IpSecGetIcvLength ((UINT8) SessionCommon->SaParams->IntegAlgId);
IkeSaSession = IKEV2_SA_SESSION_FROM_COMMON (SessionCommon);
@@ -2592,7 +2587,6 @@ Ikev2DecryptPacket ( ChildSaSession = IKEV2_CHILD_SA_SESSION_FROM_COMMON (SessionCommon);
IkeSaSession = ChildSaSession->IkeSaSession;
CryptBlockSize = (UINT8) IpSecGetEncryptBlockSize ((UINT8) IkeSaSession->SessionCommon.SaParams->EncAlgId);
- CryptKeyLength = IpSecGetEncryptKeyLength ((UINT8) IkeSaSession->SessionCommon.SaParams->EncAlgId);
CheckSumSize = (UINT8) IpSecGetIcvLength ((UINT8) IkeSaSession->SessionCommon.SaParams->IntegAlgId);
} else {
//
@@ -2768,7 +2762,6 @@ Ikev2EncryptPacket ( UINT8 *EncryptPayloadBuf; // Contain whole Encrypted Payload
UINTN EncryptPayloadSize; // Total size of the Encrypted payload
UINT8 *IntegrityBuf; // Buffer to be intergity
- UINT32 IntegrityBufSize; // Buffer size of IntegrityBuf
UINT8 *IvBuffer; // Initialization Vector
UINT8 IvSize; // Iv Size
UINT8 CheckSumSize; // Integrity Check Sum Size depends on intergrity Auth
@@ -2780,7 +2773,6 @@ Ikev2EncryptPacket ( EFI_STATUS Status;
LIST_ENTRY *Entry;
IKE_PAYLOAD *IkePayload;
- UINTN CryptKeyLength;
HASH_DATA_FRAGMENT Fragments[1];
Status = EFI_SUCCESS;
@@ -2795,7 +2787,6 @@ Ikev2EncryptPacket ( IkeSaSession = NULL;
CryptBlockSize = 0;
CheckSumSize = 0;
- CryptKeyLength = 0;
IntegrityBuf = NULL;
//
// Get the Block Size
@@ -2803,7 +2794,6 @@ Ikev2EncryptPacket ( if (SessionCommon->IkeSessionType == IkeSessionTypeIkeSa) {
CryptBlockSize = (UINT8) IpSecGetEncryptBlockSize ((UINT8) SessionCommon->SaParams->EncAlgId);
- CryptKeyLength = IpSecGetEncryptKeyLength ((UINT8) SessionCommon->SaParams->EncAlgId);
CheckSumSize = (UINT8) IpSecGetIcvLength ((UINT8) SessionCommon->SaParams->IntegAlgId);
IkeSaSession = IKEV2_SA_SESSION_FROM_COMMON (SessionCommon);
@@ -2812,7 +2802,6 @@ Ikev2EncryptPacket ( ChildSaSession = IKEV2_CHILD_SA_SESSION_FROM_COMMON (SessionCommon);
IkeSaSession = ChildSaSession->IkeSaSession;
CryptBlockSize = (UINT8) IpSecGetEncryptBlockSize ((UINT8) IkeSaSession->SessionCommon.SaParams->EncAlgId);
- CryptKeyLength = IpSecGetEncryptKeyLength ((UINT8) IkeSaSession->SessionCommon.SaParams->EncAlgId);
CheckSumSize = (UINT8) IpSecGetIcvLength ((UINT8) IkeSaSession->SessionCommon.SaParams->IntegAlgId);
}
@@ -2919,7 +2908,6 @@ Ikev2EncryptPacket ( Status = EFI_OUT_OF_RESOURCES;
goto ON_EXIT;
}
- IntegrityBufSize = IkePacket->Header->Length;
IkeHdrHostToNet (IkePacket->Header);
CopyMem (IntegrityBuf, IkePacket->Header, sizeof (IKE_HEADER));
diff --git a/NetworkPkg/IpSecDxe/Ikev2/Sa.c b/NetworkPkg/IpSecDxe/Ikev2/Sa.c index ae13e4d1b4..9967e1a682 100644 --- a/NetworkPkg/IpSecDxe/Ikev2/Sa.c +++ b/NetworkPkg/IpSecDxe/Ikev2/Sa.c @@ -1,6 +1,7 @@ /** @file
The operations for IKEv2 SA.
+ (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
@@ -1132,7 +1133,6 @@ Ikev2AuthCertParser ( IKE_PAYLOAD *TsiPayload;
IKE_PAYLOAD *TsrPayload;
IKE_PAYLOAD *CertPayload;
- IKE_PAYLOAD *CertReqPayload;
IKE_PAYLOAD *VerifiedAuthPayload;
LIST_ENTRY *Entry;
EFI_STATUS Status;
@@ -1151,7 +1151,6 @@ Ikev2AuthCertParser ( TsiPayload = NULL;
TsrPayload = NULL;
CertPayload = NULL;
- CertReqPayload = NULL;
VerifiedAuthPayload = NULL;
Status = EFI_INVALID_PARAMETER;
@@ -1183,9 +1182,6 @@ Ikev2AuthCertParser ( if (IkePayload->PayloadType == IKEV2_PAYLOAD_TYPE_CERT) {
CertPayload = IkePayload;
}
- if (IkePayload->PayloadType == IKEV2_PAYLOAD_TYPE_CERTREQ) {
- CertReqPayload = IkePayload;
- }
}
if ((SaPayload == NULL) || (AuthPayload == NULL) || (TsiPayload == NULL) ||
@@ -1478,7 +1474,6 @@ Ikev2GenerateSaKeys ( {
EFI_STATUS Status;
IKEV2_SA_PARAMS *SaParams;
- IPSEC_PAD_ENTRY *Pad;
PRF_DATA_FRAGMENT Fragments[4];
UINT64 InitiatorCookieNet;
UINT64 ResponderCookieNet;
@@ -1503,8 +1498,6 @@ Ikev2GenerateSaKeys ( //
Ikev2GenerateSaDhComputeKey (IkeSaSession->IkeKeys->DhBuffer, KePayload);
- Pad = IkeSaSession->Pad;
-
//
// Get the key length of Authenticaion, Encryption, PRF, and Integrity.
//
diff --git a/NetworkPkg/IpSecDxe/Ikev2/Utility.c b/NetworkPkg/IpSecDxe/Ikev2/Utility.c index cb436b65a6..8769850d41 100644 --- a/NetworkPkg/IpSecDxe/Ikev2/Utility.c +++ b/NetworkPkg/IpSecDxe/Ikev2/Utility.c @@ -1,6 +1,7 @@ /** @file
The Common operations used by IKE Exchange Process.
+ (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
@@ -571,7 +572,6 @@ Ikev2ChildSaSessionReg ( IKEV2_SESSION_COMMON *SessionCommon;
IKEV2_CHILD_SA_SESSION *OldChildSaSession;
IKEV2_SA_SESSION *IkeSaSession;
- IKEV2_SA_PARAMS *SaParams;
EFI_STATUS Status;
UINT64 Lifetime;
@@ -624,7 +624,6 @@ Ikev2ChildSaSessionReg ( //
// Start to count the lifetime of the IKE SA.
//
- SaParams = SessionCommon->SaParams;
if (ChildSaSession->Spd->Data->ProcessingPolicy->SaLifetime.HardLifetime != 0){
Lifetime = ChildSaSession->Spd->Data->ProcessingPolicy->SaLifetime.HardLifetime;
} else {
|