diff --git a/makerom/accessdesc.c b/makerom/accessdesc.c index f3b10563..317f759e 100644 --- a/makerom/accessdesc.c +++ b/makerom/accessdesc.c @@ -307,11 +307,6 @@ void accessdesc_GetPresetSigData(u8 **accessDescSig, u8 **cxiPubk, u8 **cxiPvtk, *cxiPubk = (u8*)app_fw1D_prod_hdrpub; *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; case 0x1E: if(keys->keyset == pki_PRODUCTION){ @@ -319,11 +314,6 @@ void accessdesc_GetPresetSigData(u8 **accessDescSig, u8 **cxiPubk, u8 **cxiPvtk, *cxiPubk = (u8*)app_fw1E_prod_hdrpub; *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; case 0x20: if(keys->keyset == pki_DEVELOPMENT){ @@ -336,11 +326,6 @@ void accessdesc_GetPresetSigData(u8 **accessDescSig, u8 **cxiPubk, u8 **cxiPvtk, *cxiPubk = (u8*)app_fw20_prod_hdrpub; *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; case 0x21: if(keys->keyset == pki_DEVELOPMENT){ @@ -353,11 +338,6 @@ void accessdesc_GetPresetSigData(u8 **accessDescSig, u8 **cxiPubk, u8 **cxiPvtk, *cxiPubk = (u8*)app_fw21_prod_hdrpub; *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; case 0x23: if(keys->keyset == pki_DEVELOPMENT){ @@ -370,11 +350,6 @@ void accessdesc_GetPresetSigData(u8 **accessDescSig, u8 **cxiPubk, u8 **cxiPvtk, *cxiPubk = (u8*)app_fw23_prod_hdrpub; *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; case 0x27: if(keys->keyset == pki_PRODUCTION){ @@ -382,11 +357,6 @@ void accessdesc_GetPresetSigData(u8 **accessDescSig, u8 **cxiPubk, u8 **cxiPvtk, *cxiPubk = (u8*)app_fw27_prod_hdrpub; *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; } @@ -399,11 +369,6 @@ void accessdesc_GetPresetSigData(u8 **accessDescSig, u8 **cxiPubk, u8 **cxiPvtk, *cxiPubk = (u8*)ecapp_fw20_prod_hdrpub; *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; case 0x23: if(keys->keyset == pki_PRODUCTION){ @@ -411,11 +376,6 @@ void accessdesc_GetPresetSigData(u8 **accessDescSig, u8 **cxiPubk, u8 **cxiPvtk, *cxiPubk = (u8*)ecapp_fw23_prod_hdrpub; *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; } } diff --git a/makerom/keyset.c b/makerom/keyset.c index eaa31168..66ebeff6 100644 --- a/makerom/keyset.c +++ b/makerom/keyset.c @@ -170,31 +170,6 @@ int LoadKeysFromResources(keys_struct *keys) SetTikCert(keys,(u8*)xsC_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; } diff --git a/makerom/keyset.h b/makerom/keyset.h index e8c92301..9d6c0c60 100644 --- a/makerom/keyset.h +++ b/makerom/keyset.h @@ -26,7 +26,6 @@ typedef enum pki_DEVELOPMENT, pki_PRODUCTION, pki_CUSTOM, - pki_GATEWAY3DS } pki_keyset; typedef enum diff --git a/makerom/user_settings.c b/makerom/user_settings.c index 1efbc0c3..792611a3 100644 --- a/makerom/user_settings.c +++ b/makerom/user_settings.c @@ -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) 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) 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) 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) - set->common.keys.keyset = pki_GATEWAY3DS; + //else if(strcasecmp(argv[i+1],"custom") == 0 || strcasecmp(argv[i+1],"c") == 0) + // set->common.keys.keyset = pki_CUSTOM; else{ fprintf(stderr,"[SETTING ERROR] Unrecognised target '%s'\n",argv[i+1]); return USR_BAD_ARG; @@ -866,11 +868,10 @@ void DisplayHelp(char *app_name) printf(" -v Verbose output\n"); printf(" -DNAME=VALUE Substitute values in RSF file\n"); printf("KEY OPTIONS:\n"); - printf(" -target Target for crypto, defaults to 't'\n"); + printf(" -target Target for crypto, defaults to 't'\n"); printf(" 't' Test(false) Keys & prod Certs\n"); printf(" 'd' Development Keys & Certs\n"); printf(" 'p' Production Keys & Certs\n"); - printf(" 'g' Production Keys & Certs for GW3DS only\n"); printf(" -ckeyid Override the automatic common key selection\n"); printf(" -ncchseckey Ncch keyX index ('0'=1.0+, '1'=7.0+)\n"); printf(" -showkeys Display the loaded key chain\n");