mirror of https://github.com/acidanthera/audk.git
Update ipsecconfig and ping6 due to ShellLib update.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10990 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
97f98500c1
commit
780847d128
|
@ -178,14 +178,14 @@ STR2INT mMapIpSecProtocol[] = {
|
|||
// --auth-algo
|
||||
//
|
||||
STR2INT mMapAuthAlgo[] = {
|
||||
{ L"NONE", EFI_IPSEC_AALG_NONE },
|
||||
{ L"MD5HMAC", EFI_IPSEC_AALG_MD5HMAC },
|
||||
{ L"SHA1HMAC", EFI_IPSEC_AALG_SHA1HMAC },
|
||||
{ L"SHA2-256HMAC", EFI_IPSEC_AALG_SHA2_256HMAC },
|
||||
{ L"SHA2-384HMAC", EFI_IPSEC_AALG_SHA2_384HMAC },
|
||||
{ L"SHA2-512HMAC", EFI_IPSEC_AALG_SHA2_512HMAC },
|
||||
{ L"AES-XCBC-MAC", EFI_IPSEC_AALG_AES_XCBC_MAC },
|
||||
{ L"NULL", EFI_IPSEC_AALG_NULL },
|
||||
{ L"NONE", IPSEC_AALG_NONE },
|
||||
{ L"MD5HMAC", IPSEC_AALG_MD5HMAC },
|
||||
{ L"SHA1HMAC", IPSEC_AALG_SHA1HMAC },
|
||||
{ L"SHA2-256HMAC", IPSEC_AALG_SHA2_256HMAC },
|
||||
{ L"SHA2-384HMAC", IPSEC_AALG_SHA2_384HMAC },
|
||||
{ L"SHA2-512HMAC", IPSEC_AALG_SHA2_512HMAC },
|
||||
{ L"AES-XCBC-MAC", IPSEC_AALG_AES_XCBC_MAC },
|
||||
{ L"NULL", IPSEC_AALG_NULL },
|
||||
{ NULL, 0 },
|
||||
};
|
||||
|
||||
|
@ -193,20 +193,20 @@ STR2INT mMapAuthAlgo[] = {
|
|||
// --encrypt-algo
|
||||
//
|
||||
STR2INT mMapEncAlgo[] = {
|
||||
{ L"NONE", EFI_IPSEC_EALG_NONE },
|
||||
{ L"DESCBC", EFI_IPSEC_EALG_DESCBC },
|
||||
{ L"3DESCBC", EFI_IPSEC_EALG_3DESCBC },
|
||||
{ L"CASTCBC", EFI_IPSEC_EALG_CASTCBC },
|
||||
{ L"BLOWFISHCBC", EFI_IPSEC_EALG_BLOWFISHCBC },
|
||||
{ L"NULL", EFI_IPSEC_EALG_NULL },
|
||||
{ L"AESCBC", EFI_IPSEC_EALG_AESCBC },
|
||||
{ L"AESCTR", EFI_IPSEC_EALG_AESCTR },
|
||||
{ L"AES-CCM-ICV8", EFI_IPSEC_EALG_AES_CCM_ICV8 },
|
||||
{ L"AES-CCM-ICV12",EFI_IPSEC_EALG_AES_CCM_ICV12 },
|
||||
{ L"AES-CCM-ICV16",EFI_IPSEC_EALG_AES_CCM_ICV16 },
|
||||
{ L"AES-GCM-ICV8", EFI_IPSEC_EALG_AES_GCM_ICV8 },
|
||||
{ L"AES-GCM-ICV12",EFI_IPSEC_EALG_AES_GCM_ICV12 },
|
||||
{ L"AES-GCM-ICV16",EFI_IPSEC_EALG_AES_GCM_ICV16 },
|
||||
{ L"NONE", IPSEC_EALG_NONE },
|
||||
{ L"DESCBC", IPSEC_EALG_DESCBC },
|
||||
{ L"3DESCBC", IPSEC_EALG_3DESCBC },
|
||||
{ L"CASTCBC", IPSEC_EALG_CASTCBC },
|
||||
{ L"BLOWFISHCBC", IPSEC_EALG_BLOWFISHCBC },
|
||||
{ L"NULL", IPSEC_EALG_NULL },
|
||||
{ L"AESCBC", IPSEC_EALG_AESCBC },
|
||||
{ L"AESCTR", IPSEC_EALG_AESCTR },
|
||||
{ L"AES-CCM-ICV8", IPSEC_EALG_AES_CCM_ICV8 },
|
||||
{ L"AES-CCM-ICV12",IPSEC_EALG_AES_CCM_ICV12 },
|
||||
{ L"AES-CCM-ICV16",IPSEC_EALG_AES_CCM_ICV16 },
|
||||
{ L"AES-GCM-ICV8", IPSEC_EALG_AES_GCM_ICV8 },
|
||||
{ L"AES-GCM-ICV12",IPSEC_EALG_AES_GCM_ICV12 },
|
||||
{ L"AES-GCM-ICV16",IPSEC_EALG_AES_GCM_ICV16 },
|
||||
{ NULL, 0 },
|
||||
};
|
||||
|
||||
|
@ -228,7 +228,7 @@ STR2INT mMapAuthMethod[] = {
|
|||
{ NULL, 0 },
|
||||
};
|
||||
|
||||
EFI_IPSEC_PROTOCOL *mIpSec;
|
||||
EFI_IPSEC2_PROTOCOL *mIpSec;
|
||||
EFI_IPSEC_CONFIG_PROTOCOL *mIpSecConfig;
|
||||
EFI_HII_HANDLE mHiiHandle;
|
||||
EFI_GUID mEfiIpSecConfigGuid = EFI_IPSEC_CONFIG_GUID;
|
||||
|
@ -711,7 +711,6 @@ InitializeIpSecConfig (
|
|||
} else {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_IPSEC_CONFIG_STATUS_ENABLE), mHiiHandle, mAppName);
|
||||
}
|
||||
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
@ -754,7 +753,7 @@ InitializeIpSecConfig (
|
|||
goto Done;
|
||||
}
|
||||
|
||||
NonOptionCount = ShellCommandLineGetCount ();
|
||||
NonOptionCount = ShellCommandLineGetCount (ParamPackage);
|
||||
if ((NonOptionCount - 1) > 0) {
|
||||
ValueStr = ShellCommandLineGetRawValue (ParamPackage, (UINT32) (NonOptionCount - 1));
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_IPSEC_REDUNDANCY_MANY), mHiiHandle, mAppName, ValueStr);
|
||||
|
|
|
@ -47,7 +47,39 @@
|
|||
#define EFI_IPSEC_ANY_PROTOCOL 0xFFFF
|
||||
#define EFI_IPSEC_ANY_PORT 0
|
||||
|
||||
typedef struct _VAR_CHECK_ITEM {
|
||||
///
|
||||
/// IPsec Authentication Algorithm Definition
|
||||
/// The number value definition is aligned to IANA assignment
|
||||
///
|
||||
#define IPSEC_AALG_NONE 0x00
|
||||
#define IPSEC_AALG_MD5HMAC 0x01
|
||||
#define IPSEC_AALG_SHA1HMAC 0x02
|
||||
#define IPSEC_AALG_SHA2_256HMAC 0x05
|
||||
#define IPSEC_AALG_SHA2_384HMAC 0x06
|
||||
#define IPSEC_AALG_SHA2_512HMAC 0x07
|
||||
#define IPSEC_AALG_AES_XCBC_MAC 0x09
|
||||
#define IPSEC_AALG_NULL 0xFB
|
||||
|
||||
///
|
||||
/// IPsec Encryption Algorithm Definition
|
||||
/// The number value definition is aligned to IANA assignment
|
||||
///
|
||||
#define IPSEC_EALG_NONE 0x00
|
||||
#define IPSEC_EALG_DESCBC 0x02
|
||||
#define IPSEC_EALG_3DESCBC 0x03
|
||||
#define IPSEC_EALG_CASTCBC 0x06
|
||||
#define IPSEC_EALG_BLOWFISHCBC 0x07
|
||||
#define IPSEC_EALG_NULL 0x0B
|
||||
#define IPSEC_EALG_AESCBC 0x0C
|
||||
#define IPSEC_EALG_AESCTR 0x0D
|
||||
#define IPSEC_EALG_AES_CCM_ICV8 0x0E
|
||||
#define IPSEC_EALG_AES_CCM_ICV12 0x0F
|
||||
#define IPSEC_EALG_AES_CCM_ICV16 0x10
|
||||
#define IPSEC_EALG_AES_GCM_ICV8 0x12
|
||||
#define IPSEC_EALG_AES_GCM_ICV12 0x13
|
||||
#define IPSEC_EALG_AES_GCM_ICV16 0x14
|
||||
|
||||
typedef struct {
|
||||
CHAR16 *VarName;
|
||||
UINT32 Attribute1;
|
||||
UINT32 Attribute2;
|
||||
|
@ -55,15 +87,15 @@ typedef struct _VAR_CHECK_ITEM {
|
|||
UINT32 Attribute4;
|
||||
} VAR_CHECK_ITEM;
|
||||
|
||||
typedef struct _SHELL_PARAM_PACKAGE{
|
||||
LIST_ENTRY Link;
|
||||
CHAR16 *Name;
|
||||
ParamType Type;
|
||||
CHAR16 *Value;
|
||||
UINTN OriginalPosition;
|
||||
typedef struct {
|
||||
LIST_ENTRY Link;
|
||||
CHAR16 *Name;
|
||||
SHELL_PARAM_TYPE Type;
|
||||
CHAR16 *Value;
|
||||
UINTN OriginalPosition;
|
||||
} SHELL_PARAM_PACKAGE;
|
||||
|
||||
typedef struct _STR2INT {
|
||||
typedef struct {
|
||||
CHAR16 *String;
|
||||
UINT32 Integer;
|
||||
} STR2INT;
|
||||
|
|
|
@ -932,7 +932,7 @@ CreateSadEntry (
|
|||
L"--auth-algo"
|
||||
);
|
||||
ReturnStatus = EFI_INVALID_PARAMETER;
|
||||
} else if ((*Data)->AlgoInfo.EspAlgoInfo.AuthAlgoId != EFI_IPSEC_AALG_NONE && (*Mask & AUTH_KEY) == 0) {
|
||||
} else if ((*Data)->AlgoInfo.EspAlgoInfo.AuthAlgoId != IPSEC_AALG_NONE && (*Mask & AUTH_KEY) == 0) {
|
||||
ShellPrintHiiEx (
|
||||
-1,
|
||||
-1,
|
||||
|
@ -956,7 +956,7 @@ CreateSadEntry (
|
|||
L"--encrypt-algo"
|
||||
);
|
||||
ReturnStatus = EFI_INVALID_PARAMETER;
|
||||
} else if ((*Data)->AlgoInfo.EspAlgoInfo.EncAlgoId != EFI_IPSEC_EALG_NONE && (*Mask & ENCRYPT_KEY) == 0) {
|
||||
} else if ((*Data)->AlgoInfo.EspAlgoInfo.EncAlgoId != IPSEC_EALG_NONE && (*Mask & ENCRYPT_KEY) == 0) {
|
||||
ShellPrintHiiEx (
|
||||
-1,
|
||||
-1,
|
||||
|
@ -999,7 +999,7 @@ CreatePadEntry (
|
|||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_STATUS ReturnStatus;
|
||||
EFI_FILE_HANDLE FileHandle;
|
||||
SHELL_FILE_HANDLE FileHandle;
|
||||
UINT64 FileSize;
|
||||
UINTN AuthDataLength;
|
||||
UINTN RevocationDataLength;
|
||||
|
@ -1588,7 +1588,7 @@ CombineSadEntry (
|
|||
//
|
||||
// Encrypt_key should be provided if algorithm is not NONE.
|
||||
//
|
||||
if (NewData->AlgoInfo.EspAlgoInfo.EncAlgoId != EFI_IPSEC_EALG_NONE && (Mask & ENCRYPT_KEY) == 0) {
|
||||
if (NewData->AlgoInfo.EspAlgoInfo.EncAlgoId != IPSEC_EALG_NONE && (Mask & ENCRYPT_KEY) == 0) {
|
||||
ShellPrintHiiEx (
|
||||
-1,
|
||||
-1,
|
||||
|
|
|
@ -1136,7 +1136,7 @@ InitializePing6 (
|
|||
//
|
||||
// Parse the paramter of destination ip address.
|
||||
//
|
||||
NonOptionCount = ShellCommandLineGetCount();
|
||||
NonOptionCount = ShellCommandLineGetCount(ParamPackage);
|
||||
ValueStr = ShellCommandLineGetRawValue (ParamPackage, (UINT32)(NonOptionCount-1));
|
||||
if (NonOptionCount != 2) {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_PING6_INVALID_INPUT), mHiiHandle);
|
||||
|
|
Loading…
Reference in New Issue