File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed
Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -793,3 +793,20 @@ amdtool_on_amd_mock() {
793793cap_upd_tool_mock () {
794794 return 0
795795}
796+
797+ # ###############################################################################
798+ # cap_upd_tool
799+ # ###############################################################################
800+ # Leave empty to call original tool, set to "true" to return 1 otherwise
801+ # return 0
802+ TEST_KEY_VALIDATOR_FAIL=" ${TEST_KEY_VALIDATOR_RESULT:- } "
803+
804+ btg_key_validator_mock () {
805+ if [ -z " ${TEST_KEY_VALIDATOR_FAIL} " ]; then
806+ btg_key_validator " $@ "
807+ elif [ " ${TEST_KEY_VALIDATOR_FAIL} " = " true" ]; then
808+ return 1
809+ else
810+ return 0
811+ fi
812+ }
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ RDMSR="tool_wrapper rdmsr"
6060LSPCI=" tool_wrapper lspci"
6161LSUSB=" tool_wrapper lsusb"
6262DUMP_PCRS=" tool_wrapper dump_pcrs"
63+ BTG_KEY_VALIDATOR=" tool_wrapper btg_key_validator"
6364
6465# ###############################################################################
6566# Tools wrapper.
Original file line number Diff line number Diff line change @@ -1473,7 +1473,7 @@ fuse_workflow() {
14731473 check_if_ac
14741474 download_bios
14751475 verify_artifacts bios
1476- btg_key_validator --file " $BIOS_UPDATE_FILE " --key-hash " $INTEL_BTG_HASH "
1476+ $BTG_KEY_VALIDATOR --file " $BIOS_UPDATE_FILE " --key-hash " $INTEL_BTG_HASH "
14771477 error_check " Firmware Intel BootGuard signature check failed. Aborting...
14781478Platform has not been fused and no changes were made."
14791479 # Ask user for confirmation:
You can’t perform that action at this time.
0 commit comments