2api: Adjust the order of checking dev switch in vb2api_fw_phase1
This CL is a revert to CL:300621.
In that CL, we adjusted the order of checking dev switch
(vb2_check_dev_switch) and move it after the check for recovery step
(vb2_check_recovery). The reason of that adjustment was because
vb2_check_dev_switch might return very early if the TPM is broken and
it failed to retrieve the secdata.
However, retrieving the secdata becomes a function which cannot fail
nowadays and it is not necessary to handle that scenario of the early
return in vb2_check_dev_switch. So we adjust them back to the original
order.
We also remove the related outdated unit tests in vb2_api_tests.c
BUG=none
BRANCH=none
TEST=CC=x86_64-pc-linux-gnu-clang;
make clean && make runtests
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: Iada8092e73ed9282242b1d67d101c836860e13c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3168437
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2 files changed