mirror of
https://github.com/DarkStore-3DS/Project_CTR.git
synced 2026-07-02 16:59:03 +00:00
[MakeROM] Fix InitialData generation bugs (#121)
* [makerom] Correctly initialize prod initial_data_key_x * [makerom] Properly select CCI CryptoType when not manually specified. * [makerom] Bump version to v0.18.2
This commit is contained in:
@@ -135,10 +135,15 @@ int SetCardInfoBitmask(cardinfo_hdr *hdr, cci_settings *set)
|
|||||||
|
|
||||||
str = set->rsf->CardInfo.CryptoType;
|
str = set->rsf->CardInfo.CryptoType;
|
||||||
if(!str) {
|
if(!str) {
|
||||||
if(set->options.useExternalSdkCardInfo)
|
u32 val = 0;
|
||||||
bitmask |= (3 << 6);
|
if(set->keys->keyset == pki_DEVELOPMENT) {
|
||||||
else
|
val = 3;
|
||||||
bitmask |= 0;
|
}
|
||||||
|
else{
|
||||||
|
val = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bitmask |= (val << 6);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
int val = strtol(str,NULL,10);
|
int val = strtol(str,NULL,10);
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ int LoadKeysFromResources(keys_struct *keys)
|
|||||||
SetNcchKeyX(keys, prod_unfixed_ncch_keyX[i],i);
|
SetNcchKeyX(keys, prod_unfixed_ncch_keyX[i],i);
|
||||||
|
|
||||||
// CCI
|
// CCI
|
||||||
SetCciInitialDataKeyX(keys, dev_initial_data_keyx);
|
SetCciInitialDataKeyX(keys, prod_initial_data_keyx);
|
||||||
|
|
||||||
/* RSA Keys */
|
/* RSA Keys */
|
||||||
// CIA
|
// CIA
|
||||||
|
|||||||
+1
-1
@@ -581,7 +581,7 @@ int GenCciHdr(cci_settings *set)
|
|||||||
// Sign Header
|
// Sign Header
|
||||||
if (Rsa2048Key_CanSign(&set->keys->rsa.cciCfa) == false)
|
if (Rsa2048Key_CanSign(&set->keys->rsa.cciCfa) == false)
|
||||||
{
|
{
|
||||||
printf("[NCSD WARNING] Failed to sign header\n");
|
printf("[NCSD WARNING] Failed to sign header (key was incomplete)\n");
|
||||||
memset(hdr->signature, 0xFF, 0x100);
|
memset(hdr->signature, 0xFF, 0x100);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -910,7 +910,7 @@ void PrintNoNeedParam(char *arg)
|
|||||||
|
|
||||||
void DisplayBanner(void)
|
void DisplayBanner(void)
|
||||||
{
|
{
|
||||||
printf("CTR MAKEROM v0.18.1 (C) 3DSGuy 2022\n");
|
printf("CTR MAKEROM v0.18.2 (C) 3DSGuy 2022\n");
|
||||||
printf("Built: %s %s\n\n", __TIME__, __DATE__);
|
printf("Built: %s %s\n\n", __TIME__, __DATE__);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user