reversed (un)intentional vandalism

I should have known better than to trust someone who hadn't REd the
format from scratch.
This commit is contained in:
3DSGuy
2014-09-23 13:15:07 +08:00
parent 4fcc466585
commit 2e48695ef6
4 changed files with 5 additions and 70 deletions
-40
View File
@@ -307,11 +307,6 @@ void accessdesc_GetPresetSigData(u8 **accessDescSig, u8 **cxiPubk, u8 **cxiPvtk,
*cxiPubk = (u8*)app_fw1D_prod_hdrpub; *cxiPubk = (u8*)app_fw1D_prod_hdrpub;
*cxiPvtk = NULL; *cxiPvtk = NULL;
} }
if(keys->keyset == pki_GATEWAY3DS){
*accessDescSig = (u8*)app_fw1D_prod_acexsig;
*cxiPubk = (u8*)app_fw1D_prod_hdrpub;
*cxiPvtk = (u8*)app_fw1D_prod_hdrpub;
}
break; break;
case 0x1E: case 0x1E:
if(keys->keyset == pki_PRODUCTION){ if(keys->keyset == pki_PRODUCTION){
@@ -319,11 +314,6 @@ void accessdesc_GetPresetSigData(u8 **accessDescSig, u8 **cxiPubk, u8 **cxiPvtk,
*cxiPubk = (u8*)app_fw1E_prod_hdrpub; *cxiPubk = (u8*)app_fw1E_prod_hdrpub;
*cxiPvtk = NULL; *cxiPvtk = NULL;
} }
if(keys->keyset == pki_GATEWAY3DS){
*accessDescSig = (u8*)app_fw1E_prod_acexsig;
*cxiPubk = (u8*)app_fw1E_prod_hdrpub;
*cxiPvtk = (u8*)app_fw1E_prod_hdrpub;
}
break; break;
case 0x20: case 0x20:
if(keys->keyset == pki_DEVELOPMENT){ if(keys->keyset == pki_DEVELOPMENT){
@@ -336,11 +326,6 @@ void accessdesc_GetPresetSigData(u8 **accessDescSig, u8 **cxiPubk, u8 **cxiPvtk,
*cxiPubk = (u8*)app_fw20_prod_hdrpub; *cxiPubk = (u8*)app_fw20_prod_hdrpub;
*cxiPvtk = NULL; *cxiPvtk = NULL;
} }
if(keys->keyset == pki_GATEWAY3DS){
*accessDescSig = (u8*)app_fw20_prod_acexsig;
*cxiPubk = (u8*)app_fw20_prod_hdrpub;
*cxiPvtk = (u8*)app_fw20_prod_hdrpub;
}
break; break;
case 0x21: case 0x21:
if(keys->keyset == pki_DEVELOPMENT){ if(keys->keyset == pki_DEVELOPMENT){
@@ -353,11 +338,6 @@ void accessdesc_GetPresetSigData(u8 **accessDescSig, u8 **cxiPubk, u8 **cxiPvtk,
*cxiPubk = (u8*)app_fw21_prod_hdrpub; *cxiPubk = (u8*)app_fw21_prod_hdrpub;
*cxiPvtk = NULL; *cxiPvtk = NULL;
} }
if(keys->keyset == pki_GATEWAY3DS){
*accessDescSig = (u8*)app_fw21_prod_acexsig;
*cxiPubk = (u8*)app_fw21_prod_hdrpub;
*cxiPvtk = (u8*)app_fw21_prod_hdrpub;
}
break; break;
case 0x23: case 0x23:
if(keys->keyset == pki_DEVELOPMENT){ if(keys->keyset == pki_DEVELOPMENT){
@@ -370,11 +350,6 @@ void accessdesc_GetPresetSigData(u8 **accessDescSig, u8 **cxiPubk, u8 **cxiPvtk,
*cxiPubk = (u8*)app_fw23_prod_hdrpub; *cxiPubk = (u8*)app_fw23_prod_hdrpub;
*cxiPvtk = NULL; *cxiPvtk = NULL;
} }
if(keys->keyset == pki_GATEWAY3DS){
*accessDescSig = (u8*)app_fw23_prod_acexsig;
*cxiPubk = (u8*)app_fw23_prod_hdrpub;
*cxiPvtk = (u8*)app_fw23_prod_hdrpub;
}
break; break;
case 0x27: case 0x27:
if(keys->keyset == pki_PRODUCTION){ if(keys->keyset == pki_PRODUCTION){
@@ -382,11 +357,6 @@ void accessdesc_GetPresetSigData(u8 **accessDescSig, u8 **cxiPubk, u8 **cxiPvtk,
*cxiPubk = (u8*)app_fw27_prod_hdrpub; *cxiPubk = (u8*)app_fw27_prod_hdrpub;
*cxiPvtk = NULL; *cxiPvtk = NULL;
} }
if(keys->keyset == pki_GATEWAY3DS){
*accessDescSig = (u8*)app_fw27_prod_acexsig;
*cxiPubk = (u8*)app_fw27_prod_hdrpub;
*cxiPvtk = (u8*)app_fw27_prod_hdrpub;
}
break; break;
} }
@@ -399,11 +369,6 @@ void accessdesc_GetPresetSigData(u8 **accessDescSig, u8 **cxiPubk, u8 **cxiPvtk,
*cxiPubk = (u8*)ecapp_fw20_prod_hdrpub; *cxiPubk = (u8*)ecapp_fw20_prod_hdrpub;
*cxiPvtk = NULL; *cxiPvtk = NULL;
} }
if(keys->keyset == pki_GATEWAY3DS){
*accessDescSig = (u8*)ecapp_fw20_prod_acexsig;
*cxiPubk = (u8*)ecapp_fw20_prod_hdrpub;
*cxiPvtk = (u8*)ecapp_fw20_prod_hdrpub;
}
break; break;
case 0x23: case 0x23:
if(keys->keyset == pki_PRODUCTION){ if(keys->keyset == pki_PRODUCTION){
@@ -411,11 +376,6 @@ void accessdesc_GetPresetSigData(u8 **accessDescSig, u8 **cxiPubk, u8 **cxiPvtk,
*cxiPubk = (u8*)ecapp_fw23_prod_hdrpub; *cxiPubk = (u8*)ecapp_fw23_prod_hdrpub;
*cxiPvtk = NULL; *cxiPvtk = NULL;
} }
if(keys->keyset == pki_GATEWAY3DS){
*accessDescSig = (u8*)ecapp_fw23_prod_acexsig;
*cxiPubk = (u8*)ecapp_fw23_prod_hdrpub;
*cxiPvtk = (u8*)ecapp_fw23_prod_hdrpub;
}
break; break;
} }
} }
-25
View File
@@ -170,31 +170,6 @@ int LoadKeysFromResources(keys_struct *keys)
SetTikCert(keys,(u8*)xsC_ppki_cert); SetTikCert(keys,(u8*)xsC_ppki_cert);
SetTmdCert(keys,(u8*)cpB_ppki_cert); SetTmdCert(keys,(u8*)cpB_ppki_cert);
} }
else if(keys->keyset == pki_GATEWAY3DS){
keys->keysetLoaded = true;
/* AES Keys */
// CIA
if(keys->aes.currentCommonKey > 0xff)
SetCurrentCommonKey(keys,0);
// NCCH
SetNormalKey(keys,(u8*)dev_fixed_ncch_key[0]);
SetSystemFixedKey(keys,(u8*)dev_fixed_ncch_key[0]);
/* RSA Keys */
// CIA
SetTIK_RsaKey(keys,(u8*)xsC_ppki_rsa_priv,(u8*)xsC_ppki_rsa_pub);
SetTMD_RsaKey(keys,(u8*)cpB_ppki_rsa_priv,(u8*)cpB_ppki_rsa_pub);
// CCI/CFA
Set_CCI_CFA_RsaKey(keys,(u8*)prod_ncsd_cfa_priv,(u8*)prod_ncsd_cfa_pub);
// CXI
SetAccessDesc_RsaKey(keys,(u8*)prod_acex_priv,(u8*)prod_acex_pub);
/* Certs */
SetCaCert(keys,(u8*)ca3_ppki_cert);
SetTikCert(keys,(u8*)xsC_ppki_cert);
SetTmdCert(keys,(u8*)cpB_ppki_cert);
}
return 0; return 0;
} }
-1
View File
@@ -26,7 +26,6 @@ typedef enum
pki_DEVELOPMENT, pki_DEVELOPMENT,
pki_PRODUCTION, pki_PRODUCTION,
pki_CUSTOM, pki_CUSTOM,
pki_GATEWAY3DS
} pki_keyset; } pki_keyset;
typedef enum typedef enum
+5 -4
View File
@@ -177,12 +177,14 @@ int SetArgument(int argc, int i, char *argv[], user_settings *set)
} }
if(strcasecmp(argv[i+1],"test") == 0 || strcasecmp(argv[i+1],"t") == 0) if(strcasecmp(argv[i+1],"test") == 0 || strcasecmp(argv[i+1],"t") == 0)
set->common.keys.keyset = pki_TEST; set->common.keys.keyset = pki_TEST;
//else if(strcasecmp(argv[i+1],"beta") == 0 || strcasecmp(argv[i+1],"b") == 0)
// set->common.keys.keyset = pki_BETA;
else if(strcasecmp(argv[i+1],"debug") == 0 || strcasecmp(argv[i+1],"development") == 0 || strcasecmp(argv[i+1],"d") == 0) else if(strcasecmp(argv[i+1],"debug") == 0 || strcasecmp(argv[i+1],"development") == 0 || strcasecmp(argv[i+1],"d") == 0)
set->common.keys.keyset = pki_DEVELOPMENT; set->common.keys.keyset = pki_DEVELOPMENT;
else if(strcasecmp(argv[i+1],"retail") == 0 || strcasecmp(argv[i+1],"production") == 0 || strcasecmp(argv[i+1],"p") == 0) else if(strcasecmp(argv[i+1],"retail") == 0 || strcasecmp(argv[i+1],"production") == 0 || strcasecmp(argv[i+1],"p") == 0)
set->common.keys.keyset = pki_PRODUCTION; set->common.keys.keyset = pki_PRODUCTION;
else if(strcasecmp(argv[i+1],"gw") == 0 || strcasecmp(argv[i+1],"gateway3ds") == 0 || strcasecmp(argv[i+1],"g") == 0) //else if(strcasecmp(argv[i+1],"custom") == 0 || strcasecmp(argv[i+1],"c") == 0)
set->common.keys.keyset = pki_GATEWAY3DS; // set->common.keys.keyset = pki_CUSTOM;
else{ else{
fprintf(stderr,"[SETTING ERROR] Unrecognised target '%s'\n",argv[i+1]); fprintf(stderr,"[SETTING ERROR] Unrecognised target '%s'\n",argv[i+1]);
return USR_BAD_ARG; return USR_BAD_ARG;
@@ -866,11 +868,10 @@ void DisplayHelp(char *app_name)
printf(" -v Verbose output\n"); printf(" -v Verbose output\n");
printf(" -DNAME=VALUE Substitute values in RSF file\n"); printf(" -DNAME=VALUE Substitute values in RSF file\n");
printf("KEY OPTIONS:\n"); printf("KEY OPTIONS:\n");
printf(" -target <t|d|p|g> Target for crypto, defaults to 't'\n"); printf(" -target <t|d|p> Target for crypto, defaults to 't'\n");
printf(" 't' Test(false) Keys & prod Certs\n"); printf(" 't' Test(false) Keys & prod Certs\n");
printf(" 'd' Development Keys & Certs\n"); printf(" 'd' Development Keys & Certs\n");
printf(" 'p' Production Keys & Certs\n"); printf(" 'p' Production Keys & Certs\n");
printf(" 'g' Production Keys & Certs for GW3DS only\n");
printf(" -ckeyid <index> Override the automatic common key selection\n"); printf(" -ckeyid <index> Override the automatic common key selection\n");
printf(" -ncchseckey <index> Ncch keyX index ('0'=1.0+, '1'=7.0+)\n"); printf(" -ncchseckey <index> Ncch keyX index ('0'=1.0+, '1'=7.0+)\n");
printf(" -showkeys Display the loaded key chain\n"); printf(" -showkeys Display the loaded key chain\n");