SecurityPkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
VFR file used by the SecureBoot configuration component.
|
||||
|
||||
Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -608,4 +608,4 @@ formset
|
||||
|
||||
endform;
|
||||
|
||||
endformset;
|
||||
endformset;
|
||||
|
@@ -1,13 +1,13 @@
|
||||
/** @file
|
||||
The module entry point for SecureBoot configuration module.
|
||||
|
||||
Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
@@ -35,7 +35,7 @@ SecureBootConfigDriverEntryPoint (
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
SECUREBOOT_CONFIG_PRIVATE_DATA *PrivateData;
|
||||
|
||||
|
||||
//
|
||||
// If already started, return.
|
||||
//
|
||||
@@ -50,7 +50,7 @@ SecureBootConfigDriverEntryPoint (
|
||||
if (!EFI_ERROR (Status)) {
|
||||
return EFI_ALREADY_STARTED;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Create a private data structure.
|
||||
//
|
||||
@@ -58,7 +58,7 @@ SecureBootConfigDriverEntryPoint (
|
||||
if (PrivateData == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Install SecureBoot configuration form
|
||||
//
|
||||
@@ -69,7 +69,7 @@ SecureBootConfigDriverEntryPoint (
|
||||
|
||||
//
|
||||
// Install private GUID.
|
||||
//
|
||||
//
|
||||
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||
&ImageHandle,
|
||||
&gEfiCallerIdGuid,
|
||||
@@ -86,8 +86,8 @@ SecureBootConfigDriverEntryPoint (
|
||||
ErrorExit:
|
||||
if (PrivateData != NULL) {
|
||||
UninstallSecureBootConfigForm (PrivateData);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
@@ -113,11 +113,11 @@ SecureBootConfigDriverUnload (
|
||||
ImageHandle,
|
||||
&gEfiCallerIdGuid,
|
||||
(VOID **) &PrivateData
|
||||
);
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
ASSERT (PrivateData->Signature == SECUREBOOT_CONFIG_PRIVATE_DATA_SIGNATURE);
|
||||
|
||||
gBS->UninstallMultipleProtocolInterfaces (
|
||||
@@ -126,7 +126,7 @@ SecureBootConfigDriverUnload (
|
||||
PrivateData,
|
||||
NULL
|
||||
);
|
||||
|
||||
|
||||
UninstallSecureBootConfigForm (PrivateData);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// SecureBootConfigDxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -12,8 +12,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"Secure Boot Config DXE"
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
HII Config Access protocol implementation of SecureBoot configuration module.
|
||||
|
||||
Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2018 Hewlett Packard Enterprise Development LP<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -1816,7 +1816,7 @@ LoadPeImage (
|
||||
Calculate hash of Pe/Coff image based on the authenticode image hashing in
|
||||
PE/COFF Specification 8.0 Appendix A
|
||||
|
||||
Notes: PE/COFF image has been checked by BasePeCoffLib PeCoffLoaderGetImageInfo() in
|
||||
Notes: PE/COFF image has been checked by BasePeCoffLib PeCoffLoaderGetImageInfo() in
|
||||
the function LoadPeImage ().
|
||||
|
||||
@param[in] HashAlg Hash algorithm type.
|
||||
@@ -3327,12 +3327,12 @@ SecureBootExtractConfigFromVariable (
|
||||
}
|
||||
|
||||
//
|
||||
// Check SecureBootEnable & Pk status, fix the inconsistence.
|
||||
// Check SecureBootEnable & Pk status, fix the inconsistence.
|
||||
// If the SecureBootEnable Variable doesn't exist, hide the SecureBoot Enable/Disable
|
||||
// Checkbox.
|
||||
//
|
||||
ConfigData->AttemptSecureBoot = FALSE;
|
||||
GetVariable2 (EFI_SECURE_BOOT_ENABLE_NAME, &gEfiSecureBootEnableDisableGuid, (VOID**)&SecureBootEnable, NULL);
|
||||
GetVariable2 (EFI_SECURE_BOOT_ENABLE_NAME, &gEfiSecureBootEnableDisableGuid, (VOID**)&SecureBootEnable, NULL);
|
||||
|
||||
//
|
||||
// Fix Pk, SecureBootEnable inconsistence
|
||||
@@ -4385,7 +4385,7 @@ SecureBootCallback (
|
||||
Value->u8 = SECURE_BOOT_MODE_STANDARD;
|
||||
Status = EFI_SUCCESS;
|
||||
}
|
||||
}
|
||||
}
|
||||
goto EXIT;
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Helper functions for SecureBoot configuration module.
|
||||
|
||||
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -15,15 +15,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#include "SecureBootConfigImpl.h"
|
||||
|
||||
/**
|
||||
Read file content into BufferPtr, the size of the allocate buffer
|
||||
Read file content into BufferPtr, the size of the allocate buffer
|
||||
is *FileSize plus AddtionAllocateSize.
|
||||
|
||||
@param[in] FileHandle The file to be read.
|
||||
@param[in, out] BufferPtr Pointers to the pointer of allocated buffer.
|
||||
@param[out] FileSize Size of input file
|
||||
@param[in] AddtionAllocateSize Addtion size the buffer need to be allocated.
|
||||
@param[in] AddtionAllocateSize Addtion size the buffer need to be allocated.
|
||||
In case the buffer need to contain others besides the file content.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The file was read into the buffer.
|
||||
@retval EFI_INVALID_PARAMETER A parameter was invalid.
|
||||
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
||||
@@ -62,7 +62,7 @@ ReadFileContent (
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto ON_EXIT;
|
||||
}
|
||||
|
||||
|
||||
Status = FileHandle->SetPosition (FileHandle, 0);
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto ON_EXIT;
|
||||
@@ -86,7 +86,7 @@ ReadFileContent (
|
||||
}
|
||||
|
||||
ON_EXIT:
|
||||
|
||||
|
||||
*BufferPtr = Buffer;
|
||||
return Status;
|
||||
}
|
||||
@@ -95,7 +95,7 @@ ON_EXIT:
|
||||
Close an open file handle.
|
||||
|
||||
@param[in] FileHandle The file handle to close.
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
CloseFile (
|
||||
@@ -103,7 +103,7 @@ CloseFile (
|
||||
)
|
||||
{
|
||||
if (FileHandle != NULL) {
|
||||
FileHandle->Close (FileHandle);
|
||||
FileHandle->Close (FileHandle);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ CloseFile (
|
||||
|
||||
@param[in] Integer Pointer to the nonnegative integer to be converted
|
||||
@param[in] IntSizeInWords Length of integer buffer in words
|
||||
@param[out] OctetString Converted octet string of the specified length
|
||||
@param[out] OctetString Converted octet string of the specified length
|
||||
@param[in] OSSizeInBytes Intended length of resulting octet string in bytes
|
||||
|
||||
Returns:
|
||||
@@ -138,17 +138,17 @@ Int2OctStr (
|
||||
Ptr1++, Ptr2--) {
|
||||
*Ptr2 = *Ptr1;
|
||||
}
|
||||
|
||||
|
||||
for (; Ptr1 < (CONST UINT8 *)(Integer + IntSizeInWords) && *Ptr1 == 0; Ptr1++);
|
||||
|
||||
|
||||
if (Ptr1 < (CONST UINT8 *)(Integer + IntSizeInWords)) {
|
||||
return EFI_BUFFER_TOO_SMALL;
|
||||
}
|
||||
|
||||
|
||||
if (Ptr2 >= OctetString) {
|
||||
ZeroMem (OctetString, Ptr2 - OctetString + 1);
|
||||
}
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ Int2OctStr (
|
||||
@param[in] Guid Pointer to GUID to print.
|
||||
@param[in] Buffer Buffer to print Guid into.
|
||||
@param[in] BufferSize Size of Buffer.
|
||||
|
||||
|
||||
@retval Number of characters printed.
|
||||
|
||||
**/
|
||||
@@ -173,9 +173,9 @@ GuidToString (
|
||||
|
||||
Size = UnicodeSPrint (
|
||||
Buffer,
|
||||
BufferSize,
|
||||
BufferSize,
|
||||
L"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
|
||||
(UINTN)Guid->Data1,
|
||||
(UINTN)Guid->Data1,
|
||||
(UINTN)Guid->Data2,
|
||||
(UINTN)Guid->Data3,
|
||||
(UINTN)Guid->Data4[0],
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
String definitions for Secure Boot Configuration form.
|
||||
|
||||
Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -98,7 +98,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#string STR_SECURE_BOOT_ENROLL_PK_FILE #language en-US "Enroll PK Using File"
|
||||
|
||||
#string STR_DELETE_PK #language en-US "Delete Pk"
|
||||
#string STR_DELETE_PK_HELP #language en-US "Choose to Delete PK, Otherwise keep the PK"
|
||||
#string STR_DELETE_PK_HELP #language en-US "Choose to Delete PK, Otherwise keep the PK"
|
||||
|
||||
#string STR_ENROLL_PK_TITLE #language en-US "Enroll PK"
|
||||
|
||||
@@ -106,7 +106,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#string STR_ENROLL_KEK_HELP #language en-US "Enter into Enroll KEK Form"
|
||||
|
||||
#string STR_DELETE_KEK #language en-US "Delete KEK"
|
||||
#string STR_DELETE_KEK_HELP #language en-US "Enter into Delete KEK Form"
|
||||
#string STR_DELETE_KEK_HELP #language en-US "Enter into Delete KEK Form"
|
||||
|
||||
#string STR_ENROLL_KEK_TITLE #language en-US "Enroll KEK"
|
||||
#string STR_DELETE_KEK_TITLE #language en-US "Delete KEK"
|
||||
|
Reference in New Issue
Block a user