mirror of
https://github.com/PabloMK7/citra.git
synced 2024-12-29 11:06:12 +00:00
qt: Add NCCH secure 1/2 to keys needed for system titles download. (#6586)
This commit is contained in:
parent
f1ece7c56f
commit
abd949fea1
|
@ -247,9 +247,10 @@ ConfigureSystem::ConfigureSystem(QWidget* parent)
|
||||||
ui->combo_download_set->setCurrentIndex(0); // set to Minimal
|
ui->combo_download_set->setCurrentIndex(0); // set to Minimal
|
||||||
ui->combo_download_region->setCurrentIndex(0); // set to the base region
|
ui->combo_download_region->setCurrentIndex(0); // set to the base region
|
||||||
|
|
||||||
bool keys_available = true;
|
|
||||||
HW::AES::InitKeys(true);
|
HW::AES::InitKeys(true);
|
||||||
for (u8 i = 0; i < HW::AES::MaxCommonKeySlot; i++) {
|
bool keys_available = HW::AES::IsKeyXAvailable(HW::AES::KeySlotID::NCCHSecure1) &&
|
||||||
|
HW::AES::IsKeyXAvailable(HW::AES::KeySlotID::NCCHSecure2);
|
||||||
|
for (u8 i = 0; i < HW::AES::MaxCommonKeySlot && keys_available; i++) {
|
||||||
HW::AES::SelectCommonKeyIndex(i);
|
HW::AES::SelectCommonKeyIndex(i);
|
||||||
if (!HW::AES::IsNormalKeyAvailable(HW::AES::KeySlotID::TicketCommonKey)) {
|
if (!HW::AES::IsNormalKeyAvailable(HW::AES::KeySlotID::TicketCommonKey)) {
|
||||||
keys_available = false;
|
keys_available = false;
|
||||||
|
|
|
@ -573,6 +573,10 @@ void SetNormalKey(std::size_t slot_id, const AESKey& key) {
|
||||||
key_slots.at(slot_id).SetNormalKey(key);
|
key_slots.at(slot_id).SetNormalKey(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool IsKeyXAvailable(std::size_t slot_id) {
|
||||||
|
return key_slots.at(slot_id).x.has_value();
|
||||||
|
}
|
||||||
|
|
||||||
bool IsNormalKeyAvailable(std::size_t slot_id) {
|
bool IsNormalKeyAvailable(std::size_t slot_id) {
|
||||||
return key_slots.at(slot_id).normal.has_value();
|
return key_slots.at(slot_id).normal.has_value();
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,6 +76,7 @@ void SetKeyX(std::size_t slot_id, const AESKey& key);
|
||||||
void SetKeyY(std::size_t slot_id, const AESKey& key);
|
void SetKeyY(std::size_t slot_id, const AESKey& key);
|
||||||
void SetNormalKey(std::size_t slot_id, const AESKey& key);
|
void SetNormalKey(std::size_t slot_id, const AESKey& key);
|
||||||
|
|
||||||
|
bool IsKeyXAvailable(std::size_t slot_id);
|
||||||
bool IsNormalKeyAvailable(std::size_t slot_id);
|
bool IsNormalKeyAvailable(std::size_t slot_id);
|
||||||
AESKey GetNormalKey(std::size_t slot_id);
|
AESKey GetNormalKey(std::size_t slot_id);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue