Skip PIN verification after a MCU reboot on A9LH
This commit is contained in:
parent
8209433696
commit
18bd4bbcf6
@ -129,7 +129,7 @@ void main(void)
|
||||
//Boot options aren't being forced
|
||||
if(needConfig != DONT_CONFIGURE)
|
||||
{
|
||||
bool pinExists = CONFIG(8) && verifyPin();
|
||||
bool pinExists = CONFIG(8) && verifyPin(isA9lh && CFG_BOOTENV);
|
||||
|
||||
//If no configuration file exists or SELECT is held, load configuration menu
|
||||
bool shouldLoadConfigMenu = needConfig == CREATE_CONFIGURATION || ((pressed & BUTTON_SELECT) && !(pressed & BUTTON_L1));
|
||||
|
@ -103,7 +103,7 @@ void newPin(bool allowSkipping)
|
||||
}
|
||||
}
|
||||
|
||||
bool verifyPin(void)
|
||||
bool verifyPin(bool skipVerification)
|
||||
{
|
||||
initScreens();
|
||||
|
||||
@ -123,6 +123,8 @@ bool verifyPin(void)
|
||||
//Test vector verification (SD card has, or hasn't been used on another console)
|
||||
if(memcmp(pin.testHash, tmp, 32) != 0) return false;
|
||||
|
||||
if(!skipVerification)
|
||||
{
|
||||
//Pad to AES block length with zeroes
|
||||
u8 __attribute__((aligned(4))) enteredPassword[16 * ((PIN_LENGTH + 15) / 16)] = {0};
|
||||
|
||||
@ -171,6 +173,7 @@ bool verifyPin(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
@ -44,4 +44,4 @@ typedef struct __attribute__((packed))
|
||||
} PINData;
|
||||
|
||||
void newPin(bool allowSkipping);
|
||||
bool verifyPin(void);
|
||||
bool verifyPin(bool skipVerification);
|
Reference in New Issue
Block a user