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
//\r
// Initial point\r
//\r
- KeyBuf = NULL;\r
AuthPayload = NULL;\r
Digest = NULL;\r
Signature = NULL;\r
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
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
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