mirror of
https://github.com/CTCaer/hekate
synced 2024-12-22 19:31:12 +00:00
hos: improve error for missing BEK or corrupt pkg1 on T210B01
This commit is contained in:
parent
d2595a00b6
commit
8d3700b76b
1 changed files with 10 additions and 1 deletions
|
@ -898,8 +898,17 @@ int hos_launch(ini_sec_t *cfg)
|
||||||
if (!pkg1_decrypt(ctxt.pkg1_id, ctxt.pkg1))
|
if (!pkg1_decrypt(ctxt.pkg1_id, ctxt.pkg1))
|
||||||
{
|
{
|
||||||
_hos_crit_error("Pkg1 decryption failed!");
|
_hos_crit_error("Pkg1 decryption failed!");
|
||||||
|
|
||||||
|
// Check if T210B01 BEK is missing or wrong.
|
||||||
if (h_cfg.t210b01)
|
if (h_cfg.t210b01)
|
||||||
EPRINTF("Is BEK missing?");
|
{
|
||||||
|
u32 bek_vector[4] = {0};
|
||||||
|
se_aes_crypt_ecb(13, ENCRYPT, bek_vector, SE_KEY_128_SIZE, bek_vector, SE_KEY_128_SIZE);
|
||||||
|
if (bek_vector[0] == 0x59C14895) // Encrypted zeroes first 32bits.
|
||||||
|
EPRINTF("Pkg1 corrupt?");
|
||||||
|
else
|
||||||
|
EPRINTF("BEK is missing!");
|
||||||
|
}
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue