fix secure1 secondary key calc (#6149)
This commit is contained in:
parent
76f8d08d66
commit
bc6e45ab3b
|
@ -247,7 +247,12 @@ Loader::ResultStatus NCCHContainer::Load() {
|
||||||
switch (ncch_header.secondary_key_slot) {
|
switch (ncch_header.secondary_key_slot) {
|
||||||
case 0:
|
case 0:
|
||||||
LOG_DEBUG(Service_FS, "Secure1 crypto");
|
LOG_DEBUG(Service_FS, "Secure1 crypto");
|
||||||
secondary_key = primary_key;
|
SetKeyY(KeySlotID::NCCHSecure1, key_y_secondary);
|
||||||
|
if (!IsNormalKeyAvailable(KeySlotID::NCCHSecure1)) {
|
||||||
|
LOG_ERROR(Service_FS, "Secure1 KeyX missing");
|
||||||
|
failed_to_decrypt = true;
|
||||||
|
}
|
||||||
|
secondary_key = GetNormalKey(KeySlotID::NCCHSecure1);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
LOG_DEBUG(Service_FS, "Secure2 crypto");
|
LOG_DEBUG(Service_FS, "Secure2 crypto");
|
||||||
|
|
Loading…
Reference in New Issue