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