mirror of
https://github.com/linuxboot/heads.git
synced 2025-01-18 10:46:44 +00:00
gui-init: update $TOTP after generating new secret or resetting TPM
After updating/flashing a new ROM, a new TOTP secret must be generated, but the $TOTP variable needs to be updated afterwards, otherwise it will show the previous failure which led to the new secret being created. Fix this by re-calling update_totp() after generating a new secret or resetting the TPM. Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>
This commit is contained in:
parent
5746b8c970
commit
1c6f623c25
@ -170,14 +170,14 @@ update_totp()
|
||||
g )
|
||||
if (whiptail $BG_COLOR_WARNING --title 'Generate new TOTP/HOTP secret' \
|
||||
--yesno "This will erase your old secret and replace it with a new one!\n\nDo you want to proceed?" 16 90) then
|
||||
generate_totp_htop && BG_COLOR_MAIN_MENU=""
|
||||
generate_totp_htop && update_totp && BG_COLOR_MAIN_MENU=""
|
||||
fi
|
||||
;;
|
||||
i )
|
||||
return 1
|
||||
;;
|
||||
p )
|
||||
reset_tpm && BG_COLOR_MAIN_MENU=""
|
||||
reset_tpm && update_totp && BG_COLOR_MAIN_MENU=""
|
||||
;;
|
||||
x )
|
||||
recovery "User requested recovery shell"
|
||||
|
Loading…
Reference in New Issue
Block a user