Qt: Implement "Extract Certificates from NAND"

This commit is contained in:
spycrab 2017-08-26 14:41:53 +02:00
parent 561d31f887
commit 1173c2f790
2 changed files with 17 additions and 0 deletions

View File

@ -117,6 +117,9 @@ void MenuBar::AddToolsMenu()
m_import_backup = tools_menu->addAction(tr("Import BootMii NAND Backup..."),
[this] { emit ImportNANDBackup(); });
m_extract_certificates = tools_menu->addAction(tr("Extract Certificates from NAND"), this,
&MenuBar::NANDExtractCertificates);
m_boot_sysmenu->setEnabled(false);
connect(&Settings::Instance(), &Settings::NANDRefresh, [this] { UpdateToolsMenu(false); });
@ -458,3 +461,15 @@ void MenuBar::ExportWiiSaves()
CWiiSaveCrypted::ExportAllSaves();
}
void MenuBar::NANDExtractCertificates()
{
if (DiscIO::NANDImporter().ExtractCertificates(File::GetUserPath(D_WIIROOT_IDX)))
{
QMessageBox::information(this, tr("Success"),
tr("Successfully extracted certificates from NAND"));
}
else
{
QMessageBox::critical(this, tr("Error"), tr("Failed to extract certificates from NAND"));
}
}

View File

@ -96,6 +96,7 @@ private:
void InstallWAD();
void ImportWiiSave();
void ExportWiiSaves();
void NANDExtractCertificates();
// File
QAction* m_open_action;
@ -109,6 +110,7 @@ private:
QAction* m_ntscu_ipl;
QAction* m_pal_ipl;
QAction* m_import_backup;
QAction* m_extract_certificates;
// Emulation
QAction* m_play_action;