mirror_edk2/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe
Gary Lin bac308be0c SecurityPkg/SecureBootConfigDxe: Declare EFIAPI for the ChooseFile handlers
The SecureBootConfig now uses ChooseFile() from FileExplorerLib
to select the certificates to be enrolled into PK, KEK, DB, DBX,
or DBT, and the corresponding handlers to get the content of the
file. Per the definition of CHOOSE_HANDLER, the handler must use
EFIAPI as the calling convention. However, the calling convention
was not specified the following handlers: UpdatePKFromFile(),
UpdateKEKFromFile(), UpdateDBFromFile(), UpdateDBXFromFile(), and
UpdateDBTFromFile(). When compiling the firmware with gcc, the
default calling convention is not compatible with EFIAPI, so the
handlers interpreted the argument the wrong way and passed the
wrong device path to UpdatePage(), and the system crashed when
the user tried to enroll a certificate into the key database.

This commit specifies the calling convention for those functions
so that gcc can generate the right code.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
2016-03-24 09:26:46 +01:00
..
SecureBootConfig.vfr SecurityPkg: Use FileExplorerLib in SecureBootConfigDxe 2016-02-26 16:52:51 +08:00
SecureBootConfigDevicePath.c Update all the code to consume the ConvertDevicePathToText, ConvertDevicePathNodeToText, ConvertTextToDevicePath and ConvertTextToDeviceNode APIs in DevicePathLib. 2013-07-26 03:14:08 +00:00
SecureBootConfigDriver.c Enable/Disable Secured Boot by 'Secure Boot Configuration' Page which is under Setup browser. 2011-10-28 03:46:20 +00:00
SecureBootConfigDxe.inf SecurityPkg: Use FileExplorerLib in SecureBootConfigDxe 2016-02-26 16:52:51 +08:00
SecureBootConfigDxe.uni SecurityPkg: Convert all .uni files to utf-8 2015-12-15 04:58:32 +00:00
SecureBootConfigDxeExtra.uni SecurityPkg: Convert all .uni files to utf-8 2015-12-15 04:58:32 +00:00
SecureBootConfigFileExplorer.c SecurityPkg/SecureBootConfigDxe: Declare EFIAPI for the ChooseFile handlers 2016-03-24 09:26:46 +01:00
SecureBootConfigImpl.c SecurityPkg: SecureBootConfigDxe: Update coding style 2016-03-11 12:28:01 +08:00
SecureBootConfigImpl.h SecurityPkg/SecureBootConfigDxe: Declare EFIAPI for the ChooseFile handlers 2016-03-24 09:26:46 +01:00
SecureBootConfigMisc.c SecurityPkg:Replace unsafe string functions. 2015-07-08 06:59:50 +00:00
SecureBootConfigNvData.h SecurityPkg: Use FileExplorerLib in SecureBootConfigDxe 2016-02-26 16:52:51 +08:00
SecureBootConfigStrings.uni SecurityPkg: SecureBootConfigDxe: Fix string typo 2016-01-15 05:26:04 +00:00