mirror of
https://github.com/linuxboot/heads.git
synced 2025-04-13 14:13:02 +00:00
gui-init: improve handling when HOTPKEY not present
Allow user to cancel HOTPKEY check, set BG color appropriately Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>
This commit is contained in:
parent
a0308b808f
commit
feca95a0c1
@ -198,10 +198,15 @@ update_hotp()
|
||||
HOTP=`unseal-hotp`
|
||||
enable_usb
|
||||
if ! hotp_verification info ; then
|
||||
whiptail $BG_COLOR_WARNING --clear \
|
||||
--title "WARNING: Please Insert Your $HOTPKEY_BRANDING" \
|
||||
--msgbox "Your $HOTPKEY_BRANDING was not detected.\n\nPlease insert your $HOTPKEY_BRANDING" 30 90
|
||||
if ! whiptail $BG_COLOR_WARNING --clear \
|
||||
--title "WARNING: Please Insert Your $HOTPKEY_BRANDING" \
|
||||
--yes-button "Retry" --no-button "Skip" \
|
||||
--yesno "Your $HOTPKEY_BRANDING was not detected.\n\nPlease insert your $HOTPKEY_BRANDING" 30 90 ; then
|
||||
HOTP="Error checking code, Insert $HOTPKEY_BRANDING and retry"
|
||||
BG_COLOR_MAIN_MENU=$BG_COLOR_WARNING
|
||||
return
|
||||
fi
|
||||
fi
|
||||
# Don't output HOTP codes to screen, so as to make replay attacks harder
|
||||
hotp_verification check $HOTP
|
||||
case "$?" in
|
||||
|
Loading…
x
Reference in New Issue
Block a user