The ChooseFile handler, UpdateCAFromFile, has to be EFIAPI or gcc would
use the wrong ABI and cause the crash of the firmware. This commit also
removes the unnecessary type casting in ChooseFile.
Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
@retval FALSE Not exit caller function.
**/
BOOLEAN
+EFIAPI\r
UpdateCAFromFile (
IN EFI_DEVICE_PATH_PROTOCOL *FilePath
)
CleanUpPage (LabelId, Private);
break;
case KEY_TLS_AUTH_CONFIG_ENROLL_CERT_FROM_FILE:
- ChooseFile( NULL, NULL, (CHOOSE_HANDLER) UpdateCAFromFile, &File);
+ ChooseFile( NULL, NULL, UpdateCAFromFile, &File);\r
break;
case KEY_TLS_AUTH_CONFIG_VALUE_SAVE_AND_EXIT: