Merge branch 'master' into ctrtool-silence-output

This commit is contained in:
jakcron
2022-04-12 11:48:13 +08:00
3 changed files with 16 additions and 6 deletions
+12 -4
View File
@@ -171,8 +171,10 @@ void ctrtool::CciProcess::importHeader()
ctrtool::KeyBag::Aes128Key initial_data_key;
bool initial_data_key_available = false;
// crypto_type 0 is the normal "secure" initial data key
if (mHeader.card_info.flag.crypto_type == ntd::n3ds::CciHeader::CryptoType_Secure)
// crypto_type 0-2 is the normal "secure" initial data key
if (mHeader.card_info.flag.crypto_type == ntd::n3ds::CciHeader::CryptoType_Secure0 ||
mHeader.card_info.flag.crypto_type == ntd::n3ds::CciHeader::CryptoType_Secure1 ||
mHeader.card_info.flag.crypto_type == ntd::n3ds::CciHeader::CryptoType_Secure2)
{
if (mKeyBag.brom_static_key_x.find(mKeyBag.KEYSLOT_INITIAL_DATA) != mKeyBag.brom_static_key_x.end())
{
@@ -548,8 +550,14 @@ std::string ctrtool::CciProcess::getCryptoTypeString(byte_t crypto_type)
switch(crypto_type)
{
case ntd::n3ds::CciHeader::CryptoType_Secure :
ret_str = "Secure";
case ntd::n3ds::CciHeader::CryptoType_Secure0 :
ret_str = "Secure0";
break;
case ntd::n3ds::CciHeader::CryptoType_Secure1 :
ret_str = "Secure1";
break;
case ntd::n3ds::CciHeader::CryptoType_Secure2 :
ret_str = "Secure2";
break;
case ntd::n3ds::CciHeader::CryptoType_FixedKey :
ret_str = "FixedKey";
+1 -1
View File
@@ -3,5 +3,5 @@
#define BIN_NAME "ctrtool"
#define VER_MAJOR 1
#define VER_MINOR 0
#define VER_PATCH 3
#define VER_PATCH 4
#define AUTHORS "jakcron"