mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 19:58:53 +00:00
Force ticket to have a correct key index for importing
This commit changes the import code to ensure the common key index in the ticket is correct, as it's checked by IOS.
This commit is contained in:
parent
7c1aa9f570
commit
072991fa31
3 changed files with 17 additions and 1 deletions
|
@ -54,7 +54,12 @@ bool InstallWAD(const std::string& wad_path)
|
|||
IOS::HLE::Device::ES::Context context;
|
||||
IOS::HLE::ReturnCode ret;
|
||||
const bool checks_enabled = SConfig::GetInstance().m_enable_signature_checks;
|
||||
while ((ret = es->ImportTicket(wad.GetTicket().GetBytes(), wad.GetCertificateChain())) < 0 ||
|
||||
|
||||
IOS::ES::TicketReader ticket = wad.GetTicket();
|
||||
// Ensure the common key index is correct, as it's checked by IOS.
|
||||
ticket.FixCommonKeyIndex();
|
||||
|
||||
while ((ret = es->ImportTicket(ticket.GetBytes(), wad.GetCertificateChain())) < 0 ||
|
||||
(ret = es->ImportTitleInit(context, tmd.GetBytes(), wad.GetCertificateChain())) < 0)
|
||||
{
|
||||
if (checks_enabled && ret == IOS::HLE::IOSC_FAIL_CHECKVALUE &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue