Undo regression and re-add -ckeyid and -ncchseckey

This commit is contained in:
jakcron
2019-08-13 21:17:40 +08:00
parent ce4f09ba0e
commit 501c1714b3
3 changed files with 16 additions and 11 deletions
+3 -3
View File
@@ -73,7 +73,7 @@ int LoadKeysFromResources(keys_struct *keys)
/* AES Keys */
// CIA
//SetCommonKey(keys, zeros_aesKey,1);
if(keys->aes.currentCommonKey > 0xff)
if(keys->aes.currentCommonKey > MAX_CMN_KEY)
SetCurrentCommonKey(keys,0);
// NCCH
@@ -101,7 +101,7 @@ int LoadKeysFromResources(keys_struct *keys)
for(int i = 0; i < 6; i++)
SetCommonKey(keys, ctr_common_etd_key_dpki[i],i);
if(keys->aes.currentCommonKey > 0xff)
if(keys->aes.currentCommonKey > MAX_CMN_KEY)
SetCurrentCommonKey(keys,0);
// NCCH
@@ -133,7 +133,7 @@ int LoadKeysFromResources(keys_struct *keys)
for (int i = 0; i < 6; i++)
SetCommonKey(keys, ctr_common_etd_key_ppki[i], i);
if(keys->aes.currentCommonKey > 0xff)
if(keys->aes.currentCommonKey > MAX_CMN_KEY)
SetCurrentCommonKey(keys,0);
// NCCH